Hello, I'm making an anti-scam bot script that should ban scam bots but I don't know how to, the only function that I know of is player:Kick() but no player:Ban(). Any help towards the code to make it more hybrid, advice, etc would be greatly appreciated.
local function botChecker()
local player = game.Players.LocalPlayer
game.Players.PlayerAdded:Connect(function(plr)
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!' then
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*')
local BannedPlayerId = player.UserId
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, otherwise Cinema_Sin.'
game.Players.PlayerAdded:Connect(function(instance)
if instance.UserId == BannedPlayerId then
instance:Kick('You got banned by '..Banner..' Reason: '..BanReason)
end
end)
end
end)
end)
end)

3 comments
I found out how to do It thanks!
put [Solved] in the title
Put solved in the title