Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Ready. Are you running this as a GlobalScript?")
- print("Usage:")
- print("cmds;")
- local ban={}
- local plr=game.Players.COOLBRAYDENNOOB --put ur name here m8
- local name
- function ban(t)
- if not t==plr.Name then
- table.insert(ban,1,t)
- end
- end
- function kick(who,why)
- who:Kick(why)
- end
- function kill(who)
- if game.Players:FindFirstChild(who) then
- game.Players:FindFirstChild(who).Character.Torso:Destroy()
- end
- end
- plr.Chatted:connect(function(m)
- print("He chatted!")
- if string.sub(m,1,5):lower()=="cmds;" and string.sub(m,5,string.len(m)) then
- print("Commands:")
- print("ban;")
- print("kick;")
- print("kill;")
- end
- if string.sub(m,1,4):lower()=="ban;" and string.sub(m,5,string.len(m)) then
- print"He banned someone."
- local num=string.sub(m,5,string.len(m))
- local targ=game.Players:FindFirstChild(num)
- name=targ.Name
- ban(name)
- kick(targ,"You have been kicked from this game.")
- elseif string.sub(m,1,5):lower()=="kill;" and string.sub(m,5,string.len(m)) then
- if game.Workspace:FindFirstChild(string.sub(m,5,string.len(m))) then
- game.Workspace:FindFirstChild(string.sub(m,5,string.len(m))).Torso:Destroy()
- elseif string.sub(m,1,4):lower()=="kick;" and string.sub(m,5,string.len(m)) then
- kick(game.Workspace:FindFirstChild(string.sub(m,5,string.len(m)),"Kicked.")
- end
- end
- end)
- game.Players.PlayerAdded:connect(function(p)
- for i=1,#ban do
- if p.Name==ban[i] then
- kick(p,"You are on banlist.")
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement