Advertisement
Guest User

Untitled

a guest
Aug 3rd, 2015
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. local isAdmin = {["runtoheven"] = true, ["DrAnkle"] = 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. function onChatted(message, player)
  20. if message:sub(1, 4) == "kick/" and isAdmin[player.Name] then
  21. victim = findPlayer(message:sub(5))
  22. if victim and victim.Character then
  23. game.Workspace.victim:Destroy()
  24. end
  25. end
  26. end
  27. function onChatted(message, player)
  28. if message:sub(1, 3) == "god/" and isAdmin[player.Name] then
  29. victim = findPlayer(message:sub(4))
  30. if victim and victim.Character then
  31. game.Workspace.victim.Humanoid.MaxHealth = math.huge
  32.  
  33. end
  34. end
  35. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement