Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function kill(target)
- for i=1,#target do
- game.Players.target[i].Character:BreakJoints()
- end
- end
- function isadmin(source)
- for i=1,#admins do
- if admins[i]:lower()==source:lower() then return true end
- end
- end
- function findplayer(msg, source)
- people = {}
- c = game.Players:GetChildren()
- if msg:lower()=="me" then
- table.insert(people, source)
- return people
- elseif msg:lower()=="all" then
- for i=1,#c do
- table.insert(people, c[i])
- end
- return people
- else
- local length = msg:len()
- for i=1,#c do
- if c[i].Name:lower():sub(1, length)==msg:lower() then
- table.insert(people, c[i])
- end
- end
- return people
- end
- end
- game.Players.PlayerAdded:connect(function(player)
- source = player.Name
- if isadmin(source) == true then
- player.Chatted:connect(function(msg, player)
- if msg:lower():sub(1,6)==":kill " then
- msg = msg:sub(7)
- target = findplayer(msg, source)
- kill(target)
- end
- end)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement