Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Workspace = game:GetService('Workspace')
- local Players = game:GetService('Players')
- local LPlayer = Players.LocalPlayer
- local Admins={["TimelessDiscord"] = 1,
- ["TimelessDiscord2"] = 3,
- ["ELITEATTACKMAN"] = 3,
- }
- --print('Your player is now an admin with a power level of ' .. Admins[LPlayer.Name] .. '!')
- --[[
- _Power Levels_
- 1 - Ability to use basic, non abusive commands
- 2 - Ability to use most commands
- 3 - Ability to use all commands
- --]]
- local Commands={["ws"] = 2,
- ["jp"] = 2,
- ["kill"] = 2,
- ["damage"] = 2,
- ["cripple"] = 2,
- ["disable"] = 2,
- ["jp"] = 2,
- ["kill"] = 2,
- ["damage"] = 2,
- ["cripple"] = 2,
- ["disable"] = 2,
- }
- --If you want to edit the power requirements for these change the numbers between 1-3
- function SplitArgs(String)
- local Args = {}
- local P = "%S+"
- for i in String:gmatch(P) do
- table.insert(Args, i)
- end
- return Args
- end
- function ReturnPlayer(String,From)
- local Found = {}
- if String == "all" then
- for i,v in pairs(Players:GetPlayers()) do
- table.insert(Found,v.Name)
- end
- else
- for i,v in pairs(Players:GetPlayers()) do
- if v.Name:lower():sub(1, #String) == String:lower() then
- table.insert(Found, v.Name)
- end
- end
- end
- return Found
- end
- function Check(plr,cmd)
- if Admins[plr.Name] >= Commands[cmd] then
- return true
- else
- return false
- end
- end
- function HookChat(plr)
- plr.Chatted:connect(function(Msg)
- if Admins[plr.Name] then
- if Msg:lower():sub(1,4) == ":ws " then
- if Check(plr, "ws") then
- for i,v in pairs(ReturnPlayer(SplitArgs(Msg:sub(5))[1])) do
- Players:FindFirstChild(v).Character.Humanoid.WalkSpeed = tonumber(SplitArgs(Msg:sub(5))[2])
- end
- else
- print('Not Permitted To Use WalkSpeed, your power level ' .. Admins[plr.Name] .. ' level required' .. Commands["ws"])
- end
- end
- else
- print('Not an admin')
- end
- end)
- end
- HookChat(LPlayer)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement