Advertisement
Guest User

Untitled

a guest
Jun 24th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.73 KB | None | 0 0
  1. --(([Elite Admin Commands v1.0]))--
  2. local DataStore = game:GetService('DataStoreService')
  3. local BanList = DataStore:GetDataStore('BanList')
  4. local Admins = ('Lucid005','ItsADeadlyRose') --put the admin names like this ('Example1','Example2')
  5.  
  6. game.Players.PlayerAdded:connect(function(Player)
  7. local folder = Instance.new('Folder', Player)
  8. folder.Name = 'PlayerValues'
  9.  
  10. local BanCheck = Instance.new('BoolValue', folder)
  11. BanCheck.Name = 'IsBanned'
  12. BanCheck.Value = BanList:GetAsync(Player.UserId) or false
  13.  
  14. if Player.PlayerValues.IsBanned.Value == true then
  15. Player:Kick('You Have Been Banned') --ban text here
  16. end
  17.  
  18. Player.Chatted:connect(function(message)
  19. for i, AdminName in ipairs(Admins) do
  20. if Player.Name == AdminName then
  21.  
  22. --//Kill Command
  23. if message:sub(1,6) == 'cmd:kill ' then
  24. local TargetPlayer = game.Players:FindFirstChild(message:sub(7))
  25. if TargetPlayer then
  26. local Character = TargetPlayer.Character
  27. if Character then
  28. Character.Humanoid.Health = 0
  29.  
  30. end
  31. end
  32. end
  33.  
  34. --//Heal Command
  35. if message:sub(1,6) == 'cmd:heal ' then
  36. local TargetPlayer = game.Players:FindFirstChild(message:sub(7))
  37. if TargetPlayer then
  38. local Character = TargetPlayer.Character
  39. if Character then
  40. Character.Humanoid.Health = Character.Humanoid.MaxHealth
  41. end
  42. end
  43. end
  44.  
  45. --//ForceField Command
  46. if message:sub(1,4) == 'cmd:forcefield ' then
  47. local TargetPlayer = game.Players:FindFirstChild(message:sub(5))
  48. if TargetPlayer then
  49. local Character = TargetPlayer.Character
  50. if Character then
  51. local forcefield = Instance.new('ForceField', Character)
  52. end
  53. end
  54. end
  55.  
  56. --//Remove ForceField Command
  57. if message:sub(1,6) == 'cmd:unforcefield ' then
  58. local TargetPlayer = game.Players:FindFirstChild(message:sub(7))
  59. if TargetPlayer then
  60. local Character = TargetPlayer.Character
  61. if Character then
  62. for z, cl in pairs(Character:children()) do
  63. if cl:IsA('ForceField') then
  64. cl:Destroy()
  65. end
  66. end
  67. end
  68. end
  69. end
  70. --//Speed Command
  71. if message:sub(1,7) == 'cmd:speed ' then
  72. local TargetPlayer = game.Playera:FindFirstChild(message:sub(8))
  73. if TargetPlayer then
  74. local char = TargetPlayer.Character
  75. if char and char:FindFirstChild('Humanoid') then
  76. char.Humanoid.WalkSpeed = 50
  77. end
  78. end
  79. end
  80. --//Ban Command
  81. if message:sub(1,5) == 'cmd:ban ' then
  82. local TargetPlayer = game.Players:FindFirstChild(message:sub(6))
  83. if TargetPlayer then
  84. local BanCheck = TargetPlayer.PlayerValues.IsBanned
  85. if BanCheck then
  86. BanList:SetAsync(TargetPlayer.UserId, false)
  87. end
  88. TargetPlayer:Kick('!You Have Been Banned!')
  89. end
  90. end
  91. --//Unban Command
  92. if message:sub(1,7) == 'cmd:unban ' then
  93. local UserId = tonumber(message:sub(8))
  94. if UserId then
  95. BanList:SetAsync(UserId, false)
  96. end
  97. end
  98. end
  99. end
  100. end
  101. end
  102. end)
  103. end
  104. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement