Ban player if they say word or sentence

Save banned players UserId’s in a datastore then check datastore for UserIds when a new player joins and kick them if a result is found.

It has pros and cons its a good idea but honestly it would just end up my whole chat being filled up with ##### and per server there is about 3-5 bots meaning players wont be able to communicate

If you currently use a datastore in your game, you can store a boolean value in your datastore under the players account and set it to true. And once a player joins the game, check if the value is set to true, if it is, kick the player.

Hashtag chat is much better than:
“WaNT tOnS oF bUx? JOin >>ScamSite.Scam<< ToDaY”

I agree but if it can be stopped completely it would be beneficial I will adapt that system for now tho, not unless there is a way where if it can be deleted rather than tagged

1 Like

Just simply blacklist a bunch of words and phrases in a table, and filter messages using the chat service and string functions. IMO, it’s probably not necessary to universally ban bots, because there’s no need to go into the hassle of doing so. Check out @callmehbob’s post about this:

I also feel you should look into the resource others have provided and do some research on your own.

To add on anything someone chats, it disturbs the chat and spams the scam site links.

Just looked around and found this, it might be beneficial to what you’re asking. Void’s Anti-Scam [Open Source] - Resources / Community Resources - Roblox Developer Forum

this is not the place to ask for free labour.

That’s really old, I think it does nothing now.

Id honestly pay someone if it was completely patched but the time I can get a post out to omission someone it will just be like 5 more hours of waiting where to wait for my scripter is about the same time I need it sorted asap as we have dropped from abour 600-400 players to about 100-200 because of this

Just tried it out and it works like a charm.
Message

1 Like

If you have already lost players on your game, then why not hire a good scripter for your game today itself? And along with it, also make some basic securing scripts. Things like checking the player account age may help, although they can be disadvantages for new players.

But you can search around the devforum for how to store bans in a datastore, so not just kicking but also store them so they aren’t able to join again.


Account Age

I have tried account player age but after I used an admin to info players in game, they have ages 100+ so I cant do an awful lot with the age but thanks for the suggestion.

There are modules around the forum that may help you ban players easily, if you aren’t able to create one yourself (or till your scripter is available).

https://devforum.roblox.com/t/bansystem-a-easy-to-use-ban-system-module-open-source/804073/12

If you go to this post on the forum, it’s a pretty simple setup and should resolve your issue. You’ll put the “AntibotSettings” folder in ServerStorage and the “ChatModules” folder in the Chat service. You then just modify the “PastebinId” value in AntibotSettings to your pastebin identifier. If you can’t get it setup from the post, you can always send me a message on the forum and I’ll help you through a message.

Edit: This follows what you initially wanted to do, stops the message from being sent entirely.

Void’s Anti-Scam [Open Source] - Resources / Community Resources - Roblox Developer Forum

Okay thanks for now I have currently made it so players can only see bubble chat, to prevent it a little so from now I will be just working a solution from these messages thanks all for the help!

1 Like

Its a temp fix most of my audience is console based anyways, hopefully after an hour or two it will be sorted and back on as it stands the player count raised again so we will be working on fixing

You will need DataStores for that. Something like this would do it:

local DataStoreService = game:GetService("DataStoreService")
local Players = game:GetService("Players")

local filterOutWords = {
    --Words
}

Players.PlayerAdded:Connect(function(plr)
    local asnyc = DataStoreService:GetAsync(plr.UserId)
    if asnyc[1] == true then --(true/false)
        plr:Kick(asnyc[2]) --(reason)
    end

    plr.Chatted:Connect(function(msg)
        local splits = string.split(msg)
        for i,v in ipairs(splits) do 
            if table.find(filterOutWords, v) then
                DataStoreService:SetAsync(plr.UserId, {true, "You were banned from this game for using a prohibited word."})
                plr:Kick("You were banned from this game for using a prohibited word.")
            end
        end
    end)
end)

Haven’t tried out this script but it should work.

Also note that you shouldn’t fill in curse words, as I heard that someone got banned for that even though he never printed it or anything (not sure if it’s true or not)

He wanted them to get banned so they can’t come back.

1 Like