Advertisement
JohnJohniamm55

Untitled

Mar 27th, 2015
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. local isAdmin = {["JohnJohniamm55"] = true, ["ArceusInator"] = true, ["amanda12895"] = true}
  2.  
  3. function findPlayer(name)
  4. for _, player in ipairs(game.Players:GetPlayers()) do
  5. if player.Name:lower() == name:lower() then
  6. return player
  7. end
  8. end
  9. end
  10.  
  11. function onChatted(message, player)
  12. if message:sub(1, 5) == "kill/" and isAdmin[player.Name] then
  13. victim = findPlayer(message:sub(6))
  14. if victim and victim.Character then
  15. victim.Character:BreakJoints()
  16. end
  17. end
  18. end
  19.  
  20.  
  21. game.Players.PlayerAdded:connect(function(player)
  22. player.Chatted:connect(function(message) onChatted(message, player) end)
  23. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement