Bots are joining my game with the Console device, even though it's not available on Console

You should not check for robux word alone, as if player said something innocent like “Today I had bought some robux”, that would get him muted.

1 Like

You can use my script to prevent scam bots from sending scam messages by entering the keywords in the script.

If one of the keywords in lowercase are being matched, they wont even get added to the chat.

I tried and it doesn’t seem to work.

Try it again, it should work now.

Ungroup the scripts under chat in your game and type something like “for robux”, you’ll notice that it wont get sent.

It works now, however I would recommend you making something that it doesn’t delete the message when I say for example: Can you trade me this Fedora for Robux? Can it be 328478 Robux? I know that it’s hard to do, but the Script shouldn’t delete all the messages that have “for robux” thing in it. You can check for example for “for robux” words in message and for “visit” word. It would work better.

My script does not delete that already.

image

I had made it so that it only deletes messages which talk about earning rewards or free rewards, it should only target those bots.

1 Like

Kicking them after they’ve sent the message is too late.

2 Likes

OK, change I forgot.
I meant: Can you trade me this Fedora for Robux? Can it be 328478 Robux?

Isn’t this message:lower() with : character in it?

Bots accounts trends to be new accounts, that only connects 1 time (or maybe more)

Try this:

I meant: Can you trade me this Fedora for Robux? Can it be 328478 Robux?

I dont expect someone to say it like that, i think nobody would say robux without any price at first.
I think if they would say it, it would always be a number first and robux after that.

Its fine, dont worry about someone being filtered for no reason, it works really well and if they get filtered, they can correct themselves afterwards.

The only case i had of someone being filtered for an actual message was when someone ended his message with “roblox.”, i had hardcoded it in and i have never had anything else afterwards.

I don’t except anyone saying this too, but I saw people who did like this all the time.
You can make a bool in the Module Script called sendWarningMessage or something like this. If the value would be set to true (you can set it to true by default), every time the Script deletes your message, you will be notified in chat that your message was deleted and it will also write what was the reason of deletion.

Would it be possible to intercept the message or something and punish them then?

Ban for one day or kick or everything you want.

Yes, I use game:GetService(“Chat”):RegisterChatCallback. You can set up your own chat filter with that callback.

local function filter(message)
	local messageLower = string.lower(message.Message)
	-- run a filter that sets message.ShouldDeliver = false
	return message
end

game:GetService("Chat"):RegisterChatCallback(Enum.ChatCallbackType.OnServerReceivingMessage, filter)
4 Likes

Cool suggestion, one improvement improvement to this would be to wrap it in a string.lower() as currently if they did: “Robux”, “robux” or “robUx” it wouldn’t catch it.

You could go further and instead of checking for exact string match use some other string constructors to detect variations of this message.

Bumping this as it has become an issue again, but the bots (at least for my game) seem to be joining on PC this time, mainly in the age group EighteenAndOver.

You can tell they are bots as the amount of visits throughout the day spikes, yet the average visit length plummets:


I just saw a similar anomaly in one of my games, you can see they are joining as PC clients based on the average visit length per-platform. Age group for the spike was also EighteenAndOver here. I was actually contacted by players yesterday complaining about bots spamming the chat. I think I’m going to move my filtered word/phrase list to a datastore so it can be updated faster.


This is the anti-bot module I use in my game. Can’t remember where I got it from.

--pasja
--UPDATED: May 9rd 2020: Optimalized the code, added comments of how the code works
--I will update the list frequently since bots try to bypass this script

--Feel free to improve the script by yourself. If you did, DM me, I really like to see it.

local WordsThatTheBotProbablyWillSayWhenHeComesToSpamYourGame = {"robux", " r$ ", "!" ,".", " using ", "free", " for " ,"check ", " go ", "browser", "visit", ":"," instantly"}
local ReplaceMessage = "Im a bot, and I got kicked" --Feel free to modify :D

local function ScanForWords(msg)
   local count = 0
   for _,v in pairs(WordsThatTheBotProbablyWillSayWhenHeComesToSpamYourGame) do --loops through the list of words
   	if(string.find(msg,v) ~= nil) then --matches words with the message
   		count = count + 1 --if true, the total count will be increased with 1
   	end
   end
   if (count > 3) then --when the message matches 4 of the words in the words list, change is huge that this is a bot
   	return true
   end
   return false --if not a bot, the function returns false, so the If statement of line 26 wont succeed, and no one gets hurt
end

local function Run(ChatService)
   
   local function FilterRobuxWord(sender, messageObject, channelName)
   	if(ScanForWords(string.lower(messageObject.Message))) then
   		messageObject.Message = ReplaceMessage
   		game.Players:FindFirstChild(sender):Kick()
   	end
   end
   
   ChatService:RegisterFilterMessageFunction("makeLowercase", FilterRobuxWord)
end

return Run
3 Likes

I made this module a while ago to try to combat these sorts of issues

You’ll have to add some entries or setup your own custom list or add a commit to the repository so they’re updated for everyone

2 Likes