Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --(([Elite Admin Commands v1.0]))--
- local DataStore = game:GetService('DataStoreService')
- local BanList = DataStore:GetDataStore('BanList')
- local Admins = ('Lucid005','ItsADeadlyRose') --put the admin names like this ('Example1','Example2')
- 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
- if Player.PlayerValues.IsBanned.Value == true then
- Player:Kick('You Have Been Banned') --ban text here
- end
- Player.Chatted:connect(function(message)
- for i, AdminName in ipairs(Admins) do
- if Player.Name == AdminName then
- --//Kill Command
- if message:sub(1,6) == 'cmd:kill ' then
- 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) == 'cmd: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
- --//ForceField Command
- if message:sub(1,4) == 'cmd:forcefield ' then
- local TargetPlayer = game.Players:FindFirstChild(message:sub(5))
- if TargetPlayer then
- local Character = TargetPlayer.Character
- if Character then
- local forcefield = Instance.new('ForceField', Character)
- end
- end
- end
- --//Remove ForceField Command
- if message:sub(1,6) == 'cmd:unforcefield ' then
- local TargetPlayer = game.Players:FindFirstChild(message:sub(7))
- if TargetPlayer then
- local Character = TargetPlayer.Character
- if Character then
- for z, cl in pairs(Character:children()) do
- if cl:IsA('ForceField') then
- cl:Destroy()
- end
- end
- end
- end
- end
- --//Speed Command
- if message:sub(1,7) == 'cmd:speed ' then
- local TargetPlayer = game.Playera:FindFirstChild(message:sub(8))
- if TargetPlayer then
- local char = TargetPlayer.Character
- if char and char:FindFirstChild('Humanoid') then
- char.Humanoid.WalkSpeed = 50
- end
- end
- end
- --//Ban Command
- if message:sub(1,5) == 'cmd:ban ' then
- local TargetPlayer = game.Players:FindFirstChild(message:sub(6))
- if TargetPlayer then
- local BanCheck = TargetPlayer.PlayerValues.IsBanned
- if BanCheck then
- BanList:SetAsync(TargetPlayer.UserId, false)
- end
- TargetPlayer:Kick('!You Have Been Banned!')
- end
- end
- --//Unban Command
- if message:sub(1,7) == 'cmd:unban ' then
- local UserId = tonumber(message:sub(8))
- if UserId then
- BanList:SetAsync(UserId, false)
- end
- end
- end
- end
- end
- end
- end)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement