Ban player if they say word or sentence

Recently my game is getting botted by people saying
:moneybag: Want LOTS of ROBUX? Go to :arrow_forward: :blox.page :arrow_backward: in your browser!’

And I have tried age limits, anti spam, ect and they still keep coming back after a kick

If anyone can write some code to prevent this and ban the use permanently if they say that sentence or ‘blox.page’

Id be so thankful

Or if it is possible to make it so if the player writes the message and clicks send it doesnt send if for other players to see?

game:GetService(‘Players’).PlayerAdded:Connect(function(Player)
Player.Chatted:Connect(function(Message)
if string.find(‘Want LOTS of ROBUX? Go to’, Message) then
Player:Kick()
end
end)
end)

1 Like

Try using .Chatted and use If statement for the sentence or use a Table for “Banned words”. Then you can :Kick them or make a ban script.

The thing is i’m not a scripter like I dont have a clue what any of that means, if you could write a quick code or something?

1 Like

image

Its just consistant

2 Likes

In the Devforums we’re not supposed to give full scripts, and people should not ask for them, i recommend you looking up videos and articles to help you.

2 Likes

Check out an anti scam module I believe it’s what you are looking for.

1 Like

You can use the “Chatted” event and use “string.find” to determine if the players message includes “Want LOTS of ROBUX? Go to”.

game:GetService('Players').PlayerAdded:Connect(function(Player)
	Player.Chatted:Connect(function(Message)
		if string.find('Want LOTS of ROBUX? Go to', Message) then
			Player:Kick()
		end
	end)
end)
4 Likes

I have a kick script currently like that but Im looking for a ban because as soon as the bot gets kicked it just rejoins and does it again and it still spams the chat, if there is also a way that if the play says that word it doesnt send the chat so players can see it? could be another solution

It would be better if you made the sentence they say appear like this “##########################”
Therefore nobody in chat is going to see it.
Or another option like
[Server] this message above is a scam

1 Like

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