Advertisement
Guest User

Untitled

a guest
Aug 2nd, 2015
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 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.  
  20.  
  21.  
  22. function onChatted(message,player)
  23. if message:sub(1, 3) == "god/" and isAdmin[player.Name] then
  24. if victim and victim.Character then
  25. victim.Character:game.Workspace.[player.Name].Humanoid = math.huge
  26. end
  27. end
  28.  
  29.  
  30. function onChatted(message,player)
  31. if message:sub(1 ,2 == "kick/" and isAdmin[player.Name].then
  32. if victim and victim.Character then
  33. victim.Character:game.Players.[player.Name.]:Destroy("Get kicked scrub!")
  34. end
  35. end
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49. game.Players.PlayerAdded:connect(function(player)
  50. player.Chatted:connect(function(message) onChatted(message, player) end)
  51. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement