#How to ban everyone whose username starts with "fat"?
1 messages · Page 1 of 1 (latest)
here is a chatgpt script that may or may not work
-- Place this script in a ServerScriptService or a Script within a ServerScriptService
-- Function to check if a string starts with a specific prefix
local function startsWith(str, prefix)
return string.sub(str, 1, #prefix) == prefix
end
-- Event function to handle player joining
local function onPlayerJoin(player)
local username = player.Name
-- Check if the username starts with "fat"
if startsWith(username:lower(), "fat") then
-- Kick the player with a custom message
player:Kick("Sorry, players with usernames starting with 'fat' are not allowed in this game.")
end
end
-- Connect the onPlayerJoin function to the PlayerAdded event
game.Players.PlayerAdded:Connect(onPlayerJoin)
Here is one if you just wanna kick anyone w/ fat in their name
-- Place this script in a ServerScriptService or a Script within a ServerScriptService
-- Function to check if a string contains a specific substring
local function contains(str, substring)
return string.find(str:lower(), substring:lower()) ~= nil
end
-- Event function to handle player joining
local function onPlayerJoin(player)
local username = player.Name
-- Check if the username contains "fat"
if contains(username, "fat") then
-- Kick the player with a custom message
player:Kick("Sorry, players with usernames containing 'fat' are not allowed in this game.")
end
end
-- Connect the onPlayerJoin function to the PlayerAdded event
game.Players.PlayerAdded:Connect(onPlayerJoin)
Use the console, not Roblox chat.
Roblox chat isn't recommended for that exact reason.
Banning people based on their name is outright discrimination, which is against Roblox TOS.
But it's entirely down to the game owner who gets to play their game
not really
if you wanted to be completely sure send roblox an email or message and they might get back to you
can't actually find much about discrimination in the tou
The latter is irrelevant
Why can't I do plr.Torso.BrickColor == Brown then
An automod rule
Someone is reporting you.
Possibly for cheating rather than the word fat
Roblox reviews it and sees the word fat
And bans
you can?
apart from it not being a string