Hello,
I’m developing a anti-scam bot script that stops scam-bots from tricking the younger side of Roblox (4-7 years old). But I wanted to know if I could make the scripts more hybrid and the length of them to be shortened, I also used string.sub and string.match which I’ve never used before so corrections would be appreciated.
-Starter Gui Script
local player = game.Players.LocalPlayer
local players = game:GetService('Players')
local DataStore = game:GetService('DataStoreService')
--Please remember to credit me. (Cinema_Sin (subject to name change may vary.))
local player = game.Players.LocalPlayer
game.Players.PlayerAdded:Connect(function(plr)
local InfoFolder = Instance.new('Folder')
InfoFolder.Name = 'PlayerInfo'
InfoFolder.Parent = plr
local BanBool = Instance.new('BoolValue')
BanBool.Name = 'BanBool'
BanBool.Value = false
BanBool.Parent = InfoFolder
local name = plr.Name
local scamWebsitesTable = {
'fastbucks.me'
-- Feel free to add more scam websites
}
game.Players.LocalPlayer.Chatted:Connect(function(msg)
if string.sub(msg, 1, 150) == '/me just got TONS of ROBUX using '..scamWebsitesTable..'!'..'Visit '..scamWebsitesTable..' in your browser to generate robux instantly!' or string.match('[/me just got TONS of ROBUX using! Visit* '..scamWebsitesTable..' [in your browser to generate robux instantly!*', scamWebsitesTable and '[Visit*' and '[/me*' and '[ROBUX*' and '[robux*')then
warn('Banning in progress.')
BanBool = true
local BanReason = 'Dont break the games rules. Please read Robloxs ToS if you are unsure on the rules.'
local enforceBan = true
local Banner = 'The smart game.'
if BanBool == true then
player:Kick('You got banned by '..Banner..' Reason: '..BanReason)
wait()
warn('Banning completed. :)')
else
warn('Banning failed. :(')
end
end
end)
end)
Thanks for reading