Advertisement
CodinGlitch

Admimnin commands

Jan 17th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.16 KB | None | 0 0
  1. plr = game.Players.LocalPlayer
  2. char = plr.Character
  3. commands = {"kill", "speed", "ff", "god", "destroy", "tp", "hp", "loopkill"}
  4.  
  5. plr.Chatted:connect(function(msg)
  6. if msg:sub(0, #commands[1]) == commands[1] then
  7. local var1 = msg:sub(msg:find(" ")+1, 10000)
  8. for i,v in pairs(workspace:GetChildren()) do
  9. if v.Name:lower():find(var1:lower()) and v:FindFirstChild("Humanoid") then
  10. v.Humanoid.Health = -10
  11. end
  12. end
  13. elseif msg:sub(0, #commands[2]) == commands[2] then
  14. local var1 = msg:sub(msg:find(" ")+1, msg:find(" ", msg:find(" ")))
  15. local var2 = msg:sub(msg:find(" ", msg:find(" ")+1)+1, 2000)
  16. for i,v in pairs(workspace:GetChildren()) do
  17. if v.Name:lower():find(var1:lower()) and v:FindFirstChild("Humanoid") then
  18. v.Humanoid.WalkSpeed = tonumber(var2)
  19. end
  20. end
  21. elseif msg:sub(0, #commands[5]) == commands[5] then
  22. local var1 = msg:sub(msg:find(" ")+1, 10000)
  23. if var1:lower() == "all" then
  24. for i,v in pairs(workspace:GetChildren()) do
  25. if v:FindFirstChild("Humanoid") then
  26. v:Destroy()
  27. end
  28. end
  29. elseif var1:lower() == "others" then
  30. for i,v in pairs(workspace:GetChildren()) do
  31. if v.Name ~= char.Name and v:FindFirstChild("Humanoid") then
  32. v:Destroy()
  33. end
  34. end
  35. else
  36. for i,v in pairs(workspace:GetChildren()) do
  37. if v.Name:lower():find(var1:lower()) and v:FindFirstChild("Humanoid") then
  38. v:Destroy()
  39. end
  40. end
  41. end
  42. elseif msg:sub(0, #commands[6]) == commands[6] then
  43. local var1 = msg:sub(msg:find(" ")+1, msg:find(" ", msg:find(" ")))
  44. local var2 = msg:sub(msg:find(" ", msg:find(" ")+1)+1, 2000)
  45. for i,v in pairs(workspace:GetChildren()) do
  46. if v.Name:sub(0, #var1):lower() == var1:lower() and v:FindFirstChild("Humanoid") then
  47. for i,x in pairs(workspace:GetChildren()) do
  48. if v.Name:sub(0, #var2):lower() == var2:lower() and x:FindFirstChild("Humanoid") then
  49. print("OK???")
  50. v.HumanoidRootPart.CFrame = x.HumanoidRootPart.CFrame
  51. end
  52. end
  53. end
  54. end
  55. elseif msg:sub(0, #commands[7]) == commands[7] then
  56. local var1 = msg:sub(msg:find(" ")+1, msg:find(" ", msg:find(" ")))
  57. local var2 = msg:sub(msg:find(" ", msg:find(" ")+1)+1, 2000)
  58. for i,v in pairs(workspace:GetChildren()) do
  59. if v.Name:lower():find(var1:lower()) and v:FindFirstChild("Humanoid") then
  60. v.Humanoid.MaxHealth = var2
  61. end
  62. end
  63. elseif msg:sub(0, #commands[8]) == commands[8] then
  64. local var1 = msg:sub(msg:find(" ")+1, 10000)
  65. for i,v in pairs(workspace:GetChildren()) do
  66. if v.Name:lower():find(var1:lower()) and v:FindFirstChild("Humanoid") then
  67. while wait(5) do
  68. v.Humanoid.Health = -10
  69. end
  70. end
  71. end
  72. end
  73. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement