Advertisement
CodingForKids

Mcc script

Aug 29th, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.70 KB | None | 0 0
  1. --//Variables\\--
  2. local DataStore = game:GetService("DataStoreService")
  3. local BanList = DataStore:GetDataStore("BanList")
  4. local Admins = {"mustywurtz"} --// people you want as admin
  5.  
  6.  
  7. --//Events\\--
  8. game.Players.PlayerAdded:Connect(function(player)
  9. local Folder = Instance.new("Folder", player)
  10. Folder.Name = "PlayerValues"
  11.  
  12. local BanCheck = Instance.new("BoolValue", Folder)
  13. BanCheck.Name = "IsBanned"
  14. BanCheck.Value = BanList:GetAsync(player.userId) or false
  15.  
  16. --//Checks if the player is banned\\--
  17. if player.PlayerValues.IsBanned.Value == true then
  18. player:Kick("You're Banned") --//Reason Here\\--
  19. end
  20.  
  21. player.Chatted:Connect(function(message)
  22. for i, AdminName in ipairs(Admins) do
  23. if player.Name == AdminName then
  24. --//Comands\\--
  25. --//KillCommand\\--
  26. if message:sub(1,6) == ":kill " then --//Change : to your prefix!\\--
  27. local TargetPlayer = game.Players:FindFirstChild(message:sub(7))
  28. if TargetPlayer then
  29. local Character = TargetPlayer.Character
  30. if Character then
  31. Character.Humanoid.Health = 0
  32. end
  33. end
  34. end
  35.  
  36. --//Heal Command\\--
  37. if message:sub(1, 6) == ":heal " then
  38. local TargetPlayer = game.Players:FindFirstChild(message:sub(7))
  39. if TargetPlayer then
  40. local Character = TargetPlayer.Character
  41. if Character then
  42. Character.Humanoid.Health = Character.Humanoid.MaxHealth
  43. end
  44. end
  45. end
  46.  
  47. --//Kick Command\\--
  48. if message:sub(1,6) == ":kick " then
  49. local TargetPlayer = game.Players:FindFirstChild(message:sub(7))
  50. if TargetPlayer then
  51. TargetPlayer:Kick("Kicked by " .. player.Name) --//Kick Message or Reason\\--
  52. end
  53. end
  54.  
  55. --//Ban Command
  56. if message:sub(1,7) == ":ban " then
  57. local TargetPlayer = game.Players:FindFirstChild(message:sub(6))
  58. if TargetPlayer then
  59. local BanCheck = TargetPlayer.PlayerValues.IsBanned
  60. if BanCheck then
  61. BanCheck.Value = true
  62. BanList:SetAsync(TargetPlayer.userId, true)
  63. end
  64. TargetPlayer:Kick("You've been banned by " .. player.Name) --//Kick message or Reason\\--
  65. end
  66. end
  67.  
  68. --//Unban Command
  69. if message:sub(1, 7) == ":unban " then --//Uses id not name!\\--
  70. local UserId = tonumber(message:sub(8))
  71. if UserId then
  72. BanList:SetAsync(UserId, false)
  73. end
  74. end
  75.  
  76. --//Speed\\--
  77. if message:sub(1,7) == ":flash " then
  78. local TargetPlayer = game.Players:FindFirstChild(message:sub(8))
  79. if TargetPlayer then
  80. local Character = TargetPlayer.Character
  81. if Character then
  82. Character.Humanoid.WalkSpeed = 150
  83. end
  84. end
  85. end
  86. end
  87. break
  88. end
  89. end)
  90. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement