Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- admins = {"pighead10","mruno","not_you"}
- banned = {"noob"}
- function isPlayerAdmin(name)
- for i,v in pairs(admins) do
- if name == v then
- return true
- end
- end
- end
- function playerBanned(name)
- end
- function chatted(msg,rec)
- if string.sub(msg,1,5) == "kill/" then
- local player = game.Players:FindFirstChild(string.sub(msg,6))
- if player then
- if player.Character then player.Character.Humanoid.Health = 0
- end
- end
- elseif string.sub(msg,1,5) == "kick/" then
- local player = game.Players:FindFirstChild(string.sub(msg,6))
- if player then
- player:remove()
- end
- elseif string.sub(msg,1,4) == "ban/" then
- local player = game.Players:FindFirstChild(string.sub(msg,6))
- if player then
- player:remove()
- end
- table.insert(banned,player.Name)
- end
- end
- function playerAdded(newplayer)
- if playerBanned(newplayer.Name) then
- newplayer:remove()
- elseif isPlayerAdmin(newplayer.Name) then
- newplayer.Chatted:connect(chatted)
- else
- print("player is not admin!")
- end
- end
- game.Players.PlayerAdded:connect(playerAdded)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement