#How to ban everyone whose username starts with "fat"?

1 messages · Page 1 of 1 (latest)

light plank
#

you could just write a script which hooks into the player join event and checks if their username contains fat

#

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)
river herald
#

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.

outer fractal
#

But it's entirely down to the game owner who gets to play their game

outer fractal
#

not really

#

if you wanted to be completely sure send roblox an email or message and they might get back to you

outer fractal
#

can't actually find much about discrimination in the tou

river herald
#

The latter is irrelevant

river herald
#

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

outer fractal
#

apart from it not being a string

river herald
#

Mods just read an unfiltered chat export when someone gets reported.

#

I'd bet money on someone reporting you for cheating when you're using Adonis, and they just read the chat logs.