Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[Admin]]--
- wait()
- script.Parent=nil
- local next=next
- local pcall=pcall
- local concat=table.concat
- local insert=table.insert
- local remove=table.remove
- local lig=game:service'Lighting'
- local me=game.Players.Voreli
- local plrs=game:service'Players':GetPlayers()
- players={}
- admins={}
- superadmins={"Steven"}
- megaadmins={"Alejandro"}
- uberadmins={"Firo"}
- Jordan={"GenesisTV","Blitzorz","Player","jordan83221"}
- local cmdsList={"ff","kill","admin","superadmin","megaadmin","uberadmin","cmds","getrank","app","ws"}
- local function find(tab,item)
- for _,v in next,tab do
- if v==item then
- return true
- else
- return false
- end
- break
- end
- end
- local function getRank(plr)
- if find(admins,plr.Name) then
- return 1
- elseif find(superadmins,plr.Name) then
- return 2
- elseif find(megaadmins,plr.Name) then
- return 3
- elseif find(uberadmins,plr.Name) then
- return 4
- elseif find(Jordan,plr.Name) then
- return 5
- elseif find(players,plr.Name) then
- return 0
- end
- end
- local function getPlayers(msg)
- if msg=='me' then
- return me
- elseif msg=='all' then
- for _,v in next,plrs do
- return v
- end
- end
- for _,v in next,plrs do
- if string.find(v.Name:lower(),msg:lower()) ~= nil then
- return v
- end
- end
- end
- local function setRank(plr,rank)
- local prnk=getRank(plr)
- if rank==1 then
- if prnk>=1 then
- print("Player is already admin or above!")
- else
- insert(admins,plr.Name)
- end
- elseif rank==2 then
- if prnk>=2 then
- print("Player is already superadmin or above!")
- else
- insert(superadmins,plr.Name)
- end
- elseif rank==3 then
- if prnk>=3 then
- print("player is already megaadmin or above!")
- else
- insert(megaadmins,plr.Name)
- end
- elseif rank==4 then
- if prnk>=4 then
- print("Player is already uberadmin!")
- end
- end
- end
- local cmds={
- ["kill"]=function(p,s)
- if getRank(s)>=1 then
- local v=getPlayers(p)
- if v then
- pcall(function()
- v.Character:BreakJoints()
- end)
- else
- print("Cannot find player!")
- end
- else
- print("You are not authorized to use this command!")
- end
- end,
- ["admin"]=function(p,s)
- if getRank(s)>=2 then
- local v=getPlayers(p)
- if v then
- pcall(function()
- setRank(p,1)
- end)
- end
- else
- print("You are not authorized to use this command!")
- end
- end,
- ["superadmin"]=function(p,s)
- if getRank(s)>=3 then
- local v=getPlayers(p)
- if v then
- pcall(function()
- setRank(p,2)
- end)
- end
- else
- print("You are not authorized to use this command!")
- end
- end,
- ["megaadmin"]=function(p,s)
- if getRank(s)>=4 then
- local v=getPlayers(p)
- if v then
- pcall(function()
- setRank(p,3)
- end)
- end
- else
- print("You are not authorized to use this command!")
- end
- end,
- ["uberadmin"]=function(p,s)
- if getRank(s)>=5 then
- local v=getPlayers(p)
- if v then
- pcall(function()
- setRank(p,4)
- end)
- end
- else
- print("You are not authorized to use this command!")
- end
- end,
- ["ff"]=function(p,s)
- if getRank(s)>=1 then
- if p then
- local v=getPlayers(p)
- if v then
- pcall(function()
- local ff=Instance.new("ForceField",v.Character)
- end)
- end
- elseif p=="" then
- pcall(function()
- local ff=Instance.new("ForceField",me.Character)
- end)
- end
- else
- print("You are not authorized to use this command!")
- end
- end,
- ["cmds"]=function(t,s)
- if getRank(s)>=1 then
- print(table.concat(cmdsList,", "))
- end
- end,
- ["test"]=function(t,s)
- if getRank(s)>=1 then
- print("Test!")
- end
- end,
- ["getrank"]=function(p,s)
- if getRank(s)>=1 then
- local v=getPlayers(p)
- if v then
- if getRank(v)==1 then
- print("Target is Admin!")
- elseif getRank(v)==2 then
- print("Target is SuperAdmin.")
- elseif getRank(v)==3 then
- print("Target is MegaAdmin.")
- elseif getRank(v)==4 then
- print("Target is UberAdmin.")
- elseif getRank(v)>=5 then
- print("Target is Jordan.")
- elseif getRank(v)<1 then
- print("Target is Player.")
- end
- end
- else
- print("You are not authorized to use this command!")
- end
- end
- }
- cmds2={
- ["app"]=function(p,t,s)
- if getRank(s)>=2 then
- local v=getPlayers(p)
- if v then
- if t=="me" then
- if v.Character then
- v.CharacterAppearance="http://www.roblox.com/Asset/CharacterFetch.ashx?userId="..me.userId
- v:LoadCharacter()
- end
- else
- local g=getPlayers(t)
- if g then
- v.CharacterAppearance="http://www.roblox.com/Asset/CharacterFetch.ashx?userId="..g.userId
- v:LoadCharacter()
- end
- end
- end
- else
- print("You're not authorized to use this command!")
- end
- end,
- ["ws"]=function(p,t,s)
- if getRank(s)>=1 then
- local v=getPlayers(p)
- if v then
- if v.Character then
- v.Character.Humanoid.WalkSpeed=t
- end
- end
- else
- print("You're not authorized to use this command!")
- end
- end
- }
- local function onChatted(m,p)
- local cmd,parm=string.match(m,"(.*)/(.*)")
- if cmd then
- if parm then
- if cmds[cmd] then
- cmds[cmd](parm,p)
- end
- end
- end
- end
- local function onChatted2(m,p)
- local cmd,parm,ex=string.match(m,"(.*)/(.*)/(.*)")
- if cmd then
- if parm then
- if ex then
- if cmds2[cmd] then
- cmds2[cmd](parm,ex,p)
- end
- end
- end
- end
- end
- local function playerAdded(player)
- player.Chatted:connect(function(m) onChatted(m,player) end)
- player.Chatted:connect(function(m) onChatted2(m,player) end)
- local r=getRank(player)
- if r==1 then
- print("You're Admin!")
- elseif r==2 then
- print("Youre SuperAdmin!")
- elseif r==3 then
- print("You're MegaAdmin!")
- elseif r==4 then
- print("Youre UberAdmin!")
- elseif r==5 then
- print("You're Jordan!")
- else
- print("You're a player.")
- end
- end
- game.Players.PlayerAdded:connect(playerAdded)
- for _,v in next,plrs do
- playerAdded(v)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement