SHOW:
|
|
- or go back to the newest paste.
| 1 | - | local banned = {"xXnaranjandoXx"}
|
| 1 | + | player = game.Players.AnOfDieNeymess |
| 2 | - | local prefix = "[Banned] " |
| 2 | + | function chat(msg) |
| 3 | - | local message = "You are banned from the server! Reason: Spam killing" |
| 3 | + | if string.sub(msg, 1 ,5) =="kick/" then |
| 4 | pl = string.sub(msg,6) | |
| 5 | - | game.Players.PlayerAdded:Connect(function(player) |
| 5 | + | g = game.Players:GetPlayers() |
| 6 | - | for _, v in pairs(banned) do |
| 6 | + | for i,v in pairs(g) do |
| 7 | - | if player.Name == v then |
| 7 | + | if string.find(string.upper(v.Name),string.upper(pl)) == 1 then |
| 8 | - | player:kick(prefix..message) |
| 8 | + | v:remove() |
| 9 | - | end |
| 9 | + | end |
| 10 | - | end |
| 10 | + | end |
| 11 | - | end) |
| 11 | + | end |
| 12 | end | |
| 13 | ||
| 14 | ||
| 15 | player.chatted:connect(chat) |