Hi, please let me know if this is in the wrong category. I wasn’t really sure where to put it.
The issue:
Bots have been joining my game, Obby Creator, since yesterday, advertising scams through the Roblox chat. I can’t find a way to stop the bots and they are ruining the player experience. I’ve looked at the Developer Stats and they seem to be being counted as players on the Console device, even though the game isn’t available on Console.
Any advice on how to deal with this would be appreciated! Obviously the developer stats messing up is less of an issue than the actual bots themselves - hopefully by bringing this up someone at Roblox can find a way to make them stop soon.
EDIT: This has been happening to other users too (didn’t see their posts before this)
You can make a thing that detects a specific chat message or words in chat message. For example you can kick players who typed these words: LOTS, ROBUX, Go. Also using message:lower() will be good if you want to chech for example a message Wants lots of RObUx?
Simply detect if they said something related to “scam” type of message and kick the client. This should kick out most of the bots.
local Players = game:GetService("Players")
Players.PlayerAdded:Connect(function(player)
player.Chatted:Connect(function(message)
local matchable = string.lower(message)
local matches = {
{"want", "lots", "robux"},
{"want", "go", "robux"},
{"in", "browser", "robux"},
{"R$", "go", "to"},
{"got", "tons", "robux"},
{"using", "visit", "robux"},
{"rblx.gg", "!", "browser"},
{"earned", "robux", "rewards"},
{"for", "free", "robux"},
{"at", "free", "robux"},
-- you can add more, as you wish
}
for _, v in pairs(matches) do
if string.match(matchable, v[1]) and string.match(matchable, v[2]) and string.match(matchable, v[3]) then
player:Kick("Scamming is not allowed")
break
end
end
end)
end)
Found a temporary solution using ChatModules, by researching on some of the other posts. Would still like some intervention from Roblox but this solution will hide any of the scam messages for other players.
Step 1: Insert a folder, boolValue and module into Chat exactly like the image below.
(Make sure “InsertDefualtModules” is set to True)
Step 2: Enter the following code into the module:
local function Run(ChatService)
local function ProcessMessage(speakerName, message, channelName)
-- Get the speaker and the channel they sent a message in
local speaker = ChatService:GetSpeaker(speakerName)
local channel = ChatService:GetChannel(channelName)
-- If neither exists, we're safe to continue processing via other methods
if not speaker then return false end
if not channel then return false end
-- Check for scam content
if string.find(message, "ROBUX") or string.find(message, "blox.page") then
-- Send the message to themselves
speaker:SendMessage(message, channelName, speakerName, message.ExtraData)
-- Speaker was shadow banned, stop processing message
return true
end
-- Speaker is fine, continue processing message
return false
end
ChatService:RegisterProcessCommandsFunction("swallow_shadow_ban_chat", ProcessMessage)
end
return Run
Since this is temporary it only works for this specific bot message, but I also made it hide any message with the word “ROBUX”. You can edit however you’d like.
You should make a script for if someone spams, kick them, if they send more than one message per second, kick them so they will have to rejoin. That is what one game had and my friend discovered when he was spamming my name lol.
Consider wrapping it around an array, this makes it easier to modify your links if someone is scamming you.
local BlockedWords = {
"robux", "blox.page"
}
Then you’d want to modify your finder to work around a function like this
local function findBlockedWord(message)
for _, v in ipairs(BlockedWords) do
if string.find(message, v) then
return true --found a blocked word
end
end
return false --no blocked words were found
end
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.