Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --//Variables\\--
- local DataStore = game:GetService("DataStoreService")
- local BanList = DataStore:GetDataStore("BanList")
- local Admins = {"mustywurtz"} --// people you want as admin
- --//Events\\--
- game.Players.PlayerAdded:Connect(function(player)
- local Folder = Instance.new("Folder", player)
- Folder.Name = "PlayerValues"
- local BanCheck = Instance.new("BoolValue", Folder)
- BanCheck.Name = "IsBanned"
- BanCheck.Value = BanList:GetAsync(player.userId) or false
- --//Checks if the player is banned\\--
- if player.PlayerValues.IsBanned.Value == true then
- player:Kick("You're Banned") --//Reason Here\\--
- end
- player.Chatted:Connect(function(message)
- for i, AdminName in ipairs(Admins) do
- if player.Name == AdminName then
- --//Comands\\--
- --//KillCommand\\--
- if message:sub(1,6) == ":kill " then --//Change : to your prefix!\\--
- local TargetPlayer = game.Players:FindFirstChild(message:sub(7))
- if TargetPlayer then
- local Character = TargetPlayer.Character
- if Character then
- Character.Humanoid.Health = 0
- end
- end
- end
- --//Heal Command\\--
- if message:sub(1, 6) == ":heal " then
- local TargetPlayer = game.Players:FindFirstChild(message:sub(7))
- if TargetPlayer then
- local Character = TargetPlayer.Character
- if Character then
- Character.Humanoid.Health = Character.Humanoid.MaxHealth
- end
- end
- end
- --//Kick Command\\--
- if message:sub(1,6) == ":kick " then
- local TargetPlayer = game.Players:FindFirstChild(message:sub(7))
- if TargetPlayer then
- TargetPlayer:Kick("Kicked by " .. player.Name) --//Kick Message or Reason\\--
- end
- end
- --//Ban Command
- if message:sub(1,7) == ":ban " then
- local TargetPlayer = game.Players:FindFirstChild(message:sub(6))
- if TargetPlayer then
- local BanCheck = TargetPlayer.PlayerValues.IsBanned
- if BanCheck then
- BanCheck.Value = true
- BanList:SetAsync(TargetPlayer.userId, true)
- end
- TargetPlayer:Kick("You've been banned by " .. player.Name) --//Kick message or Reason\\--
- end
- end
- --//Unban Command
- if message:sub(1, 7) == ":unban " then --//Uses id not name!\\--
- local UserId = tonumber(message:sub(8))
- if UserId then
- BanList:SetAsync(UserId, false)
- end
- end
- --//Speed\\--
- if message:sub(1,7) == ":flash " then
- local TargetPlayer = game.Players:FindFirstChild(message:sub(8))
- if TargetPlayer then
- local Character = TargetPlayer.Character
- if Character then
- Character.Humanoid.WalkSpeed = 150
- end
- end
- end
- end
- break
- end
- end)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement