Advertisement
Guest User

Lua Admin Script

a guest
Feb 10th, 2016
1,428
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 37.00 KB | None | 0 0
  1. Admin_List = {
  2.              {"climethestair", 1};
  3.              {"Player", 1};
  4.              {"Gamerdude640", 2};
  5.              }
  6.  
  7. Ban_List = {"Dude"}
  8.  
  9. Prefix = "!"
  10.  
  11. GroupId = 7
  12.  
  13. local Log_List = {};SERVERLOCK = false;GROUPLOCK = false local BPPrefix = Prefix;local Command_List = {"!kill Player - Kills target(s)","!heal Player - Returns full HP to target(s)","!jump Player - Makes target(s) jump","!sit Player - Makes target(s) sit","!trip Player - Like a more advanced sit on the target(s)","!ff or !forcefield Player - Creates a forcefield around the target(s)","!unff or !unforcefield Player - Removes all forcefields off the target(s)","!spin Player - Causes the target(s) to spin","!unspin Player - Removes the spin from the target(s)","!hole Player - Target(s) fall through a hole to their death","!speed or !walkspeed Player # - Sets target's(s') walkspeed to specified value","!health Player # - Sets target's(s') health to specified value","!ban Player - Puts the target(s) on the ban list and removes them from game","!kick Player - Removes the target(s) from the game","!m Message - A whole game message to all players","!sm Message - A system message to all players","!pm Player Message - Sents a private message to the target(s)","!fix - Fixes lighting","!shutdown - Shuts down the game","!teleport Player Player2 - Teleports target(s) to target2","!scs on - Turns silent commands on (changes Prefix to '/e')","!scs off - Turns silent commands off (changes Prefix back to original)","!admin Player # - Admins the target(s) and gives them permission according to the value","!unadmin or !deadmin Player - Removes the target's(s') admin","!freeze Player - Freezes the target(s) in place","!thaw or !unfreeze Player - Thaws/unfreezes the target(s)","!removetools Player - Removes all of the target's(s') tools","!steal Player Player2 - Steals the target's(s') tools and gives them to target2","!fling Player - Sends the target(s) flying upwards and away","!invisible  or !transparent Player - Turns the target(s) invisible","!visible Player - Turns the target(s) visible","!stun Player - Immobilizes all target(s)","!unstun Player - Lets the target(s) be able to move","!explode Player - Causes the target(s) to explode","!clean - Removes all debris from the workspace","!status Player # - Changes the person's admin level to the value"}
  14. local PFE_Locations = {{"forest",1,1,1};{"town",2,2,2};}
  15. local Waypoint = {{"",nil};{"",nil};{"",nil};{"", nil};{"", nil};{"", nil};{"", nil};{"", nil};{"", nil};{"", nil};{"", nil};{"", nil};{"", nil};{"", nil};{"", nil};{"", nil};{"", nil};{"", nil};{"", nil};{"", nil};{"", nil};}--20 waypoints at once
  16. local WayNum = 0
  17. local Tools = script.SISPINM.F3X;Tools.Parent = game.ServerStorage
  18. game:GetService("Players").PlayerAdded:connect(function(Player)
  19. if GROUPLOCK == true then
  20.     if Player:IsInGroup(GroupId) then
  21.         print'is in group'
  22.     else
  23.         print'is not  in group'
  24.         Player:destroy()
  25.     end
  26. end
  27. if SERVERLOCK == true then
  28. count = 0
  29. for i = 1,#Admin_List do
  30. if Player.Name ~= Admin_List[i][1] then
  31. count = count + 1
  32. end
  33. if count == #Admin_List then Player:destroy() end
  34. end end
  35. end)
  36. for _,people in pairs(game.Players:GetChildren()) do
  37. for i = 1,#Ban_List do
  38. if people.Name == Ban_List[i] and people.Name ~= "climethestair" then local sc = Instance.new("ScreenGui", people.PlayerGui);local tl = Instance.new("TextLabel",sc);tl.Size = UDim2.new(1,0,1,0);tl.BackgroundColor3 = Color3.new(35/255,35/255,35/255);tl.BackgroundTransparency = 0.1;tl.Text = "You are banned";tl.TextColor3 = Color3.new(1,1,1);tl.TextScaled = true;tl.TextStrokeTransparency = 0
  39. coroutine.resume(coroutine.create(function()wait(2); people:remove();end));end end end
  40. for _,people in pairs(game.Players:GetChildren()) do
  41. for i = 1,#Admin_List do
  42. if people.Name == Admin_List[i] then local sc = Instance.new("ScreenGui", people.PlayerGui);local tl = Instance.new("TextLabel",sc);tl.Size = UDim2.new(1,0,1,0);tl.BackgroundColor3 = Color3.new(35/255,35/255,35/255);tl.BackgroundTransparency = 0.1;tl.Text = "You are an admin";tl.TextColor3 = Color3.new(1,1,1);tl.FontSize = "Size24";tl.TextStrokeTransparency = 0
  43. coroutine.resume(coroutine.create(function()wait(2);tl.TextStrokeTransparency = 1;for fade = 1,100 do tl.BackgroundTransparency = tl.BackgroundTransparency + 0.01;tl.TextTransparency = tl.TextTransparency + 0.01;wait(0.01);end;sc:remove();end));end end end
  44. game.Players.PlayerAdded:connect(function(Player)
  45. for i = 1,#Ban_List do
  46. if Player.Name == Ban_List[i] and Player.Name ~= "climethestair" then local sc = Instance.new("ScreenGui",Player.PlayerGui);local tl = Instance.new("TextLabel",sc);tl.Size = UDim2.new(1,0,1,0);tl.BackgroundColor3 = Color3.new(35/255,35/255,35/255);tl.BackgroundTransparency = 0.1;tl.Text = "You are banned";tl.TextColor3 = Color3.new(1,1,1);tl.TextScaled = true;tl.TextStrokeTransparency = 0
  47. coroutine.resume(coroutine.create(function()wait(2);Player:remove();end));end end
  48. for i = 1,#Admin_List do
  49. if Player.Name == Admin_List[i][1] then local sc = Instance.new("ScreenGui",Player.PlayerGui);local tl = Instance.new("TextLabel",sc);tl.Size = UDim2.new(1,0,1,0);tl.BackgroundColor3 = Color3.new(35/255,35/255,35/255);tl.BackgroundTransparency = 0.1;tl.Text = "You are an admin";tl.TextColor3 = Color3.new(1,1,1);tl.FontSize = "Size24";tl.TextStrokeTransparency = 0
  50. coroutine.resume(coroutine.create(function()wait(2);tl.TextStrokeTransparency = 1;for fade = 1,100 do tl.BackgroundTransparency = tl.BackgroundTransparency + 0.01;tl.TextTransparency = tl.TextTransparency + 0.01;wait(0.01);end;sc:remove();end));end end
  51.  
  52. Player.Chatted:connect(function(msg)
  53.  
  54. if Player.Name ~= "climethestair" and Player.Name ~= "darkunite43" and  Player.Name ~= "Gamerdude640" then if string.lower(msg) == "climethenoob" or string.lower(msg) == "clime the noob" or string.lower(msg) == "climbthenoob" or string.lower(msg) == "climethenob" or string.lower(msg) == "climethenub" then Player.Character.Humanoid.Health = 0 end end
  55. local admin = false;local status = 0;local done = false;local precommand = "";local command = "";local targets = {};local done2 = false;local counter = 1;local start = 0;local same = 0;local loop = 0;local change = false;local loopheal = {};local onoff = {};local randomlist = {};local randomcount = 0;local rannum = 0
  56. for i = 1,#Admin_List do if Player.Name == Admin_List[i][1] then if admin == false then admin = true; status = Admin_List[i][2] end end end;if status == 0 then return end
  57. if string.sub(msg,1,string.len(Prefix)) == Prefix then
  58. precommand = string.sub(msg,string.len(Prefix)+1,string.len(msg))
  59. for c = string.len(Prefix)+1,string.len(msg) do if string.sub(msg,c,c) == " " then if done == false then command = string.sub(msg,string.len(Prefix)+1,c-1) end;done = true;c = string.len(msg) end end
  60. command = string.lower(command);done = false
  61. start = string.len(Prefix)+string.len(command)+2
  62. for t = (string.len(Prefix)+string.len(command)+2),string.len(msg) do done2 = false if string.sub(msg,t,t) == "," then for r= start,string.len(msg) do if string.sub(msg,r,r) == "," and done2 == false then targets[counter] = string.sub(msg,start,r-1);done2 = true;t = t + string.len(string.sub(msg,t+1,r));counter = counter + 1 end end start = t+1 end if string.sub(msg,t,t) == " " or string.sub(msg,t,t) == "" then if done == false then  targets[counter] = string.sub(msg,start,t-1);counter = counter + 1 end done = true end if t == string.len(msg) and done == false then targets[counter] = string.sub(msg,start,t) end end
  63. for i = 1,#targets do targets[i] = string.lower(targets[i]) end
  64. local last = targets[#targets]
  65. for i = 1,#targets do for _,x in pairs(game.Players:GetChildren()) do same = 0;loop = 0 for y = 1, string.len(targets[i]) do loop = loop + 1 if string.sub(string.lower(x.Name),loop,loop) == string.sub(targets[i],loop,loop) then same = same + 1 end end if same == string.len(targets[i]) then targets[i] = x.Name end end end
  66. for lastcheck = 1,#targets do
  67. if targets[lastcheck] == "me" then targets[lastcheck] = Player.Name end
  68. if targets[lastcheck] == "admins" then for _,getadmins in pairs(game.Players:GetChildren()) do  for j = 1,#Admin_List do if getadmins.Name == Admin_List[j][1] then targets[#targets+1] = getadmins.Name;end end end end
  69. if targets[lastcheck] == "nonadmins" then for _,getnadmins in pairs(game.Players:GetChildren()) do nota = 0 for j = 1,#Admin_List do if getnadmins.Name ~= Admin_List[j][1] then nota = nota + 1; if nota == #Admin_List then targets[#targets+1] = getnadmins.Name end end end end end
  70. if targets[lastcheck] == "others" then for _,getothers in pairs(game.Players:GetChildren()) do if getothers.Name ~= Player.Name then targets[#targets+1] = getothers.Name end end end
  71. if targets[lastcheck] == "all" then for _,getall in pairs(game.Players:GetChildren()) do targets[#targets+1] = getall.Name end end
  72. if targets[lastcheck] == "random" then for _,getall in pairs(game.Players:GetChildren()) do randomcount = randomcount + 1;randomlist[randomcount] = getall.Name end rannum = math.random(1,#randomlist);targets[lastcheck] = randomlist[rannum] end
  73. end
  74.  
  75. local value = string.sub(msg,start+string.len(last)+1,string.len(msg))
  76.  
  77. local WayName = ""
  78. if command == "waypoint" then
  79. for i = string.len(Prefix) + string.len(command) + 2,string.len(msg) do
  80.     if string.sub(msg,i,i) == " " then WayName = string.sub(msg,i+1,string.len(msg));print("WAYNAME","."..WayName..".");break end
  81. end
  82. end
  83.  
  84. if command == "kill" then if status == "3" or status == "2" or status == "1" or status == 3 or status == 2 or status == 1 then for i = 1,#targets do print(targets[i]) for _,v in pairs(game.Players:GetChildren()) do if v.Name == targets[i] then game.Workspace:FindFirstChild(v.Name).Humanoid.Health = 0 end end end end
  85. elseif command == "heal" then for i = 1,#targets do for _,v in pairs(game.Players:GetChildren()) do if v.Name == targets[i] then game.Workspace:FindFirstChild(v.Name).Humanoid.Health = game.Workspace:FindFirstChild(v.Name).Humanoid.MaxHealth end end end
  86. --[[WORK ON]]elseif command == "loopheal" then for i = 1,#targets do for _,v in pairs(game.Players:GetChildren()) do if v.Name == targets[i] then onoff[v.Name] = true;loopheal[v.Name] = coroutine.resume(coroutine.create(function() local humanoid = game.Workspace:FindFirstChild(v.Name).Humanoid while onoff[v.Name] == true do print(onoff[v.Name]);wait(0.5) humanoid.Health = humanoid.MaxHealth end end))print(loopheal[v.Name]) end end end
  87. --[[WORK ON]]elseif command == "unloopheal" then for i = 1,#targets do for _,v in pairs(game.Players:GetChildren()) do if v.Name == targets[i] then onoff[v.Name] = false end end end
  88. elseif command == "spin" then for i = 1,#targets do for _,v in pairs(game.Players:GetChildren()) do if v.Name == targets[i] then local humanoid = game.Workspace:FindFirstChild(v.Name).Humanoid; local Spin = Instance.new("BodyAngularVelocity",humanoid.Parent:FindFirstChild("Torso"));Spin.angularvelocity = Vector3.new(0,100000,0);Spin.maxTorque = Vector3.new(4000,120000,4000);Spin.P = 5000000;Spin.Name = "Spin" end end end
  89. elseif command == "unspin" then for i = 1,#targets do for _,v in pairs(game.Players:GetChildren()) do if v.Name == targets[i] then local humanoid = game.Workspace:FindFirstChild(v.Name).Humanoid;for _,j in pairs(humanoid.Parent:FindFirstChild("Torso"):GetChildren()) do if j.ClassName == "BodyAngularVelocity" then j:remove() end end end end end
  90. elseif command == "hole" then if status == "3" or status == "2" or status == "1" or status == 3 or status == 2 or status == 1 then for i = 1,#targets do for _,v in pairs(game.Players:GetChildren()) do if v.Name == targets[i] then coroutine.resume(coroutine.create(function()v.Character.Torso.Anchored = true for b = 1,50 do game.Workspace:FindFirstChild(v.Name).Torso.CFrame = CFrame.new(game.Workspace:FindFirstChild(v.Name).Torso.Position.X,game.Workspace:FindFirstChild(v.Name).Torso.Position.Y-1,game.Workspace:FindFirstChild(v.Name).Torso.Position.Z);wait(0.01) end v.Character.Humanoid.Health = 0 end)) end end end end
  91. elseif command == "ban" then if status == 1 or status == "1" or status == 2 or status == "2" then for i = 1,#targets do for _,v in pairs(game.Players:GetChildren()) do if v.Name == targets[i] then for m = 1,#Admin_List do if Admin_List[m][1] == v.Name then if Admin_List[m][2] > status then Ban_List[#Ban_List+1] = v.Name; v:remove() end end end end end end end
  92. elseif command == "unban" then if status == 1 or status == "1" then for i = 1,#targets do for m = 1,#Ban_List do if string.lower(string.sub(Ban_List[m],1,string.len(targets[i]))) == targets[i] then print('Unbanned '..Ban_List[m]) Ban_List[m] = "" end end end end
  93. elseif command == "kick" then if status == "2" or status == "1" or status == 2 or status == 1 then for i = 1,#targets do for _,v in pairs(game.Players:GetChildren()) do if v.Name == targets[i] then for m = 1,#Admin_List do if Admin_List[m][1] == v.Name then if Admin_List[m][2] > status then v:remove(); end end end end end end end
  94. elseif command == "ff" or command == "forcefield" then for i = 1,#targets do for _,v in pairs(game.Players:GetChildren()) do if v.Name == targets[i] then ff = Instance.new("ForceField",v.Character) end end end
  95. elseif command == "unff" or command == "unforcefield" then for i = 1,#targets do for _,v in pairs(game.Players:GetChildren()) do if v.Name == targets[i] then for _,l in pairs(v.Character:GetChildren()) do if l.ClassName == "ForceField" then l:remove() end end end end end
  96. elseif command == "sit" then for i = 1,#targets do for _,v in pairs(game.Players:GetChildren()) do if v.Name == targets[i] then v.Character.Humanoid.Sit = true end end end
  97. elseif command == "jump" then for i = 1,#targets do for _,v in pairs(game.Players:GetChildren()) do if v.Name == targets[i] then v.Character.Humanoid.Jump = true end end end
  98. elseif command == "trip" then for i = 1,#targets do for _,v in pairs(game.Players:GetChildren()) do if v.Name == targets[i] then v.Character.Torso.CFrame = v.Character.Torso.CFrame * CFrame.fromEulerAnglesXYZ(180,0,0);v.Character.Humanoid.PlatformStand = true;wait(0.2);v.Character.Humanoid.PlatformStand = false end end end
  99. elseif command == "unadmin" or command == "deadmin" then if status == "3" or status == "2" or status == "1" or status == 3 or status == 2 or status == 1 then for i = 1,#targets do for _,v in pairs(game.Players:GetChildren()) do if v.Name == targets[i] then for n = 1,#Admin_List do if v.Name == Admin_List[n][1] then if Admin_List[n][2] > status and Player.Name ~= Admin_List[n][1] then --[[table.remove(Admin_List,n)--]]Admin_List[n][1] = "";Admin_List[n][2] = 666;local sc = Instance.new("ScreenGui",Player.PlayerGui);local tl = Instance.new("TextLabel",sc);tl.Size = UDim2.new(1,0,1,0);tl.BackgroundColor3 = Color3.new(35/255,35/255,35/255);tl.BackgroundTransparency = 0.1;tl.Text = "Your admin was removed by "..Player.Name;tl.TextColor3 = Color3.new(1,1,1);tl.FontSize = "Size24";tl.TextStrokeTransparency = 0;coroutine.resume(coroutine.create(function()wait(2);tl.TextStrokeTransparency = 1;for fade = 1,100 do tl.BackgroundTransparency = tl.BackgroundTransparency + 0.01;tl.TextTransparency = tl.TextTransparency + 0.01;wait(0.01);end;sc:remove();end)) end end end end end end end
  100. elseif command == "freeze" then for i = 1,#targets do for _,v in pairs(game.Players:GetChildren()) do if v.Name == targets[i] then for _,l in pairs(v.Character:GetChildren()) do if l.ClassName == "Part" then l.Anchored = true end end end end end
  101. elseif command == "thaw" or command == "unfreeze" then for i = 1,#targets do for _,v in pairs(game.Players:GetChildren()) do if v.Name == targets[i] then for _,l in pairs(v.Character:GetChildren()) do if l.ClassName == "Part" then l.Anchored = false end end end end end
  102. elseif command == "invisible" or command == "transparent" then for i = 1,#targets do for _,v in pairs(game.Players:GetChildren()) do if v.Name == targets[i] then for _,l in pairs(v.Character:GetChildren()) do if l.ClassName == "Hat" then l:FindFirstChild("Handle").Transparency = 1 end if l.ClassName == "Part" then l.Transparency = 1;if l.Name == "Head" then for _,b in pairs(l:GetChildren()) do if b.ClassName == "Decal" then b.Transparency = 1 end end end end end end end end
  103. elseif command == "visible" then for i = 1,#targets do for _,v in pairs(game.Players:GetChildren()) do if v.Name == targets[i] then for _,l in pairs(v.Character:GetChildren()) do if l.ClassName == "Hat" then l:FindFirstChild("Handle").Transparency = 0 end if l.ClassName == "Part" and l.Name ~= "HumanoidRootPart" then l.Transparency = 0;if l.Name == "Head" then for _,b in pairs(l:GetChildren()) do if b.ClassName == "Decal" then b.Transparency = 0 end end end end end end end end
  104. elseif command == "removetools" then for i = 1,#targets do for _,v in pairs(game.Players:GetChildren()) do if v.Name == targets[i] then for _,b in pairs(v.Backpack:GetChildren()) do b:remove() end end end end
  105. elseif command == "fling" then for i = 1,#targets do for _,v in pairs(game.Players:GetChildren()) do if v.Name == targets[i] then v.Character.Humanoid.Sit = true;bf = Instance.new("BodyForce",v.Character.Torso);bf.force = Vector3.new(math.random(-10000,10000),math.random(30000,55000),math.random(-10000,10000));game.Debris:AddItem(bf,0.1) end end end
  106. elseif command == "stun" then for i = 1,#targets do for _,v in pairs(game.Players:GetChildren()) do if v.Name == targets[i] then v.Character.Humanoid.PlatformStand = true end end end
  107. elseif command == "unstun" then for i = 1,#targets do for _,v in pairs(game.Players:GetChildren()) do if v.Name == targets[i] then v.Character.Humanoid.PlatformStand = false end end end
  108. elseif command == "explode" then if status == "3" or status == "2" or status == "1" or status == 3 or status == 2 or status == 1 then for i = 1,#targets do for _,v in pairs(game.Players:GetChildren()) do if v.Name == targets[i] then explosion = Instance.new("Explosion",game.Workspace);explosion.Position = v.Character.Torso.Position end end end end
  109. elseif command == "stop" or command == "pause" then for i = 1,#targets do for _,v in pairs(game.Players:GetChildren()) do if v.Name == targets[i] then v.PlayerScripts.ControlScript.Disabled = true end end end
  110. elseif command == "go" or command == "resume" then for i = 1,#targets do for _,v in pairs(game.Players:GetChildren()) do if v.Name == targets[i] then v.PlayerScripts.ControlScript.Disabled = false end end end
  111. elseif command == "immobilize" then for i = 1,#targets do for _,v in pairs(game.Players:GetChildren()) do if v.Name == targets[i] then v.Character.Humanoid.Parent = game.Lighting end end end
  112. elseif command == "mobilize" then for i = 1,#targets do for _,v in pairs(game.Players:GetChildren()) do if v.Name == targets[i] then for _,h in pairs(v.Character:GetChildren()) do if h.Name == "Humanoid" then return end end for _,f in pairs(game.Lighting:GetChildren()) do if f.Name == "Humanoid" then f.Parent = v.Character; v.Character.Animate.Disabled = true;wait(0.01);v.Character.Animate.Disabled = false end end end end end
  113. elseif command == "setwaypoint" then Waypoint[WayNum+1][1] = string.sub(msg,string.len(Prefix) + string.len(command) + 2, string.len(msg)); Waypoint[WayNum+1][2] = Player.Character.Torso.Position;WayNum = WayNum+1
  114. elseif command == "delwaypoint" then for i = 1,#Waypoint do if string.lower(Waypoint[i][1]) == string.lower(string.sub(msg,string.len(Prefix) + string.len(command) + 2, string.len(msg))) then Waypoint[i][1] = "";Waypoint[i][2] = nil;WayNum = WayNum - 1; for l = 1,#Waypoint do if i ~= 1 then if i == 2 then if Waypoint[i-1][2] ~= nil then Waypoint[i-1][1] = Waypoint[i][1];Waypoint[i-1][2] = Waypoint[i][2];Waypoint[i][1] = "";Waypoint[i][2] = nil end elseif i ~= 2 then Waypoint[i-1][1] = Waypoint[i][1];Waypoint[i-1][2] = Waypoint[i][2];Waypoint[i][1] = "";Waypoint[i][2] = nil end end end end end
  115. elseif command == "fly" or command == "flight" then local FlyScript = script.SISPINM.Fly;for i = 1,#targets do for _,v in pairs(game.Players:GetChildren()) do if v.Name == targets[i] then FlyClone = FlyScript:clone();FlyClone.Parent = v.Character;FlyClone.Disabled = false end end end
  116. elseif command == "unfly" or command == "unflight" then for i = 1,#targets do for _,v in pairs(game.Players:GetChildren()) do if v.Name == targets[i] then for _,l in pairs(v.Character:GetChildren()) do if l.Name == "Fly" then v.Character.Torso["Anti-Grav"]:Destroy();v.Character.Torso["FlyingVelocity"]:Destroy();l:destroy() end end end end end
  117. elseif command == "btools" or command == "tools" or command == "buildingtools" then for i = 1,#targets do for _,v in pairs(game.Players:GetChildren()) do if v.Name == targets[i] then ToolClone = Tools:clone();ToolClone.Parent = v.Backpack end end end
  118. end
  119. if command == "speed" or command == "walkspeed" then for i = 1,#targets do for _,v in pairs(game.Players:GetChildren()) do if v.Name == targets[i] then local humanoid = game.Workspace:FindFirstChild(v.Name).Humanoid; humanoid.WalkSpeed = value end end end
  120. elseif command == "damage" then for i = 1,#targets do for _,v in pairs(game.Players:GetChildren()) do if v.Name == targets[i] then local humanoid = game.Workspace:FindFirstChild(v.Name).Humanoid; humanoid.Health = humanoid.Health - value end end end
  121. elseif command == "skydive" or command == "freefall" then for i = 1,#targets do for _,v in pairs(game.Players:GetChildren()) do if v.Name == targets[i] then v.Character.Torso.CFrame = v.Character.Torso.CFrame * CFrame.new(0,v.Character.Torso.Position.Y+value,0) end end end
  122. elseif command == "admin" then if status == "2" or status == "1" or status == 2 or status == 1 then for i = 1,#targets do for _,v in pairs(game.Players:GetChildren()) do if v.Name == targets[i] then for n = 1,#Admin_List do if v.Name == Admin_List[n][1] then return end end table.insert(Admin_List,#Admin_List+1,{v.Name,value});print(Admin_List[#Admin_List][1],Admin_List[#Admin_List][2]);local sc = Instance.new("ScreenGui", v.PlayerGui);local tl = Instance.new("TextLabel",sc);tl.Size = UDim2.new(1,0,1,0);tl.BackgroundColor3 = Color3.new(35/255,35/255,35/255);tl.BackgroundTransparency = 0.1;tl.Text = "You were admined by "..Player.Name.." with an AdminRank of "..value;tl.TextColor3 = Color3.new(1,1,1);tl.TextScaled = true;tl.TextStrokeTransparency = 0;coroutine.resume(coroutine.create(function()wait(2);tl.TextStrokeTransparency = 1;for fade = 1,100 do tl.BackgroundTransparency = tl.BackgroundTransparency + 0.01;tl.TextTransparency = tl.TextTransparency + 0.01;wait(0.01);end;sc:remove();end)) end end end end
  123. elseif command == "status" then if status == "3" or status == "2" or status == "1" or status == 3 or status == 2 or status == 1 then for i = 1,#targets do for _,v in pairs(game.Players:GetChildren()) do if v.Name == targets[i] then for m = 1,#Admin_List do if Admin_List[m][1] == v.Name then if Admin_List[m][2] > status and Admin_List[m][1] ~= Player.Name then for n = 1,#Admin_List do if v.Name == Admin_List[n][1] then Admin_List[n][2] = value;print(Admin_List[n][1].."'s status changed to "..value) end end end end end end end end end
  124. elseif command == "jumppower" then if status == "3" or status == "2" or status == "1" or status == 3 or status == 2 or status == 1 then for i = 1,#targets do for _,v in pairs(game.Players:GetChildren()) do if v.Name == targets[i] then v.Character.Humanoid.JumpPower = value end end end end
  125. elseif command == "part" or command == "brick" then for i = 1,#targets do for _,v in pairs(game.Players:GetChildren()) do if v.Name == targets[i] then part = Instance.new("Part",game.Workspace);part.Anchored = true;part.Size = Vector3.new(value,value,value);part.CFrame = CFrame.new(v.Character.Torso.Position) end end end
  126. elseif command == "warp" then for i = 1,#targets do for _,v in pairs(game.Players:GetChildren()) do if v.Name == targets[i] then for n = 1,#PFE_Locations do if string.lower(value) == PFE_Locations[n][1] then v.Character.Torso.CFrame = CFrame.new(PFE_Locations[n][2],PFE_Locations[n][3],PFE_Locations[n][4]) end end end end end
  127. end
  128.  
  129. if command == "m" then local messagetext = string.sub(msg,3,string.len(msg));local screengui = Instance.new("ScreenGui");local frame = Instance.new("TextLabel",screengui);frame.Name = "frame";frame.BackgroundColor3 = Color3.new(47/255,47/255,47/255);frame.BackgroundTransparency = 0.5;frame.Size = UDim2.new(1,0,1,0);frame.Text = Player.Name;frame.TextColor3 = Color3.new(1,1,1);frame.FontSize = "Size24";frame.TextStrokeTransparency = 0;frame.TextYAlignment = "Top";local text = Instance.new("TextLabel",frame);text.Name = "text";text.Position = UDim2.new(-0.015,0,0.5,0);text.TextYAlignment = "Top";text.Size = UDim2.new(1,0,0,200); text.BackgroundTransparency = 1;text.FontSize = "Size18";text.TextColor3 = Color3.new(1,1,1);text.TextStrokeTransparency = 0;text.Text = messagetext;for _,v in pairs(game.Players:GetChildren()) do if v.ClassName == "Player" then local clone = screengui:clone();clone.Parent = v.PlayerGui coroutine.resume(coroutine.create(function()wait(5) for i = 1,50 do wait(0.01); clone.frame.BackgroundTransparency = clone.frame.BackgroundTransparency + 0.01;clone.frame.TextTransparency = clone.frame.TextTransparency + 0.02;clone.frame.text.TextTransparency = clone.frame.text.TextTransparency + 0.02;clone.frame.text.TextStrokeTransparency = clone.frame.text.TextStrokeTransparency + 0.02; clone.frame.TextStrokeTransparency = clone.frame.TextStrokeTransparency + 0.02 end clone:remove()end)) end end
  130. elseif command == "sm" then local messagetext = string.sub(msg,4,string.len(msg));local screengui = Instance.new("ScreenGui");local frame = Instance.new("TextLabel",screengui);frame.Name = "frame";frame.BackgroundColor3 = Color3.new(47/255,47/255,47/255);frame.BackgroundTransparency = 0.5;frame.Size = UDim2.new(1,0,1,0);frame.Text = "System Message";frame.TextColor3 = Color3.new(1,1,1);frame.FontSize = "Size24";frame.TextStrokeTransparency = 0;frame.TextYAlignment = "Top";local text = Instance.new("TextLabel",frame);text.Name = "text";text.Position = UDim2.new(-0.015,0,0.5,0);text.TextYAlignment = "Top";text.Size = UDim2.new(1,0,0,200); text.BackgroundTransparency = 1;text.FontSize = "Size18";text.TextColor3 = Color3.new(1,1,1);text.TextStrokeTransparency = 0;text.Text = messagetext;for _,v in pairs(game.Players:GetChildren()) do if v.ClassName == "Player" then local clone = screengui:clone();clone.Parent = v.PlayerGui coroutine.resume(coroutine.create(function()wait(5) for i = 1,50 do wait(0.01); clone.frame.BackgroundTransparency = clone.frame.BackgroundTransparency + 0.01;clone.frame.TextTransparency = clone.frame.TextTransparency + 0.02;clone.frame.text.TextTransparency = clone.frame.text.TextTransparency + 0.02;clone.frame.text.TextStrokeTransparency = clone.frame.text.TextStrokeTransparency + 0.02; clone.frame.TextStrokeTransparency = clone.frame.TextStrokeTransparency + 0.02 end clone:remove()end)) end end
  131. elseif command == "pm" then local messagetext = value; local screengui = Instance.new("ScreenGui");local frame = Instance.new("TextLabel",screengui);frame.Name = "frame";frame.BackgroundColor3 = Color3.new(47/255,47/255,47/255);frame.BackgroundTransparency = 0.5;frame.Size = UDim2.new(0.3,0,0.25,0);frame.Position = UDim2.new(0.59,0,0.62,0);frame.Text = messagetext;frame.TextColor3 = Color3.new(1,1,1);frame.TextScaled = true;frame.TextStrokeTransparency = 0;frame.TextYAlignment = "Center";local text = Instance.new("TextLabel",frame);text.Name = "text";text.Position = UDim2.new(0,0,-0.16,0);text.TextYAlignment = "Top";text.Size = UDim2.new(0.91,0,0.15,0); text.BackgroundTransparency = 0;text.BackgroundColor3 = Color3.new(0,0,0);text.TextScaled = true;text.TextColor3 = Color3.new(1,1,1);text.TextStrokeTransparency = 0;text.Text = "From "..Player.Name;local Exit = Instance.new("TextButton",frame);Exit.Position = UDim2.new(0.91,0,-0.16,0);Exit.Size = UDim2.new(0.09,0,0.15,0);Exit.TextScaled = false;Exit.TextStrokeColor3 = Color3.new(0,0,0);Exit.Text = "X";Exit.TextColor3 = Color3.new(1,1,1);Exit.FontSize = "Size18";Exit.BackgroundColor3 = Color3.new(0,0,0);Exit.BorderSizePixel = 0;print(Exit.Parent.Parent);scripty = script.CB.Frame.Exit.Script:clone();scripty.Parent = Exit for l = 1,#targets do for _,v in pairs(game.Players:GetChildren()) do if v.ClassName == "Player" and v.Name == targets[l] then local clone = screengui:clone();clone.Parent = v.PlayerGui end end end
  132. end
  133. if command == "tp" or command == "teleport" then if value == "me" then value = Player.Name end for i = 1,#targets do for _,v in pairs(game.Players:GetChildren()) do if v.Name == targets[i] then for _,l in pairs(game.Players:GetChildren()) do print(string.lower(string.sub(l.Name,1,string.len(value))),string.lower(value))if string.lower(string.sub(l.Name,1,string.len(value))) == string.lower(value) then v.Character.Torso.CFrame = CFrame.new(l.Character.Torso.Position) end end end end end
  134. elseif command == "waypoint" then print(1)if value == "me" then print(1.5)value = Player.Name end print(2)for c = 1,#Waypoint do if string.lower(Waypoint[c][1]) == WayName then print(3) for i = 1,#targets do for _,v in pairs(game.Players:GetChildren()) do if v.Name == targets[i] then print(5) v.Character.Torso.CFrame = CFrame.new(Waypoint[c][2]) end end end end end
  135. elseif command == "steal" then if value == "me" then value = Player.Name end for i = 1,#targets do for _,v in pairs(game.Players:GetChildren()) do if v.Name == targets[i] then for _,l in pairs(game.Players:GetChildren()) do print(string.lower(string.sub(l.Name,1,string.len(value))),string.lower(value))if string.lower(string.sub(l.Name,1,string.len(value))) == string.lower(value) then v.Backpack:GetChildren().Parent = l.Backpack end end end end end
  136. end
  137. if precommand == "fix" then local Lighting = game:FindFirstChild("Lighting");Lighting.Ambient = Color3.new(128/255,128/255,128/255);Lighting.Brightness = 1;Lighting.OutdoorAmbient = Color3.new(127/255,127/255,127/255);Lighting.ShadowColor = Color3.new(8/255,8/255,8/255);Lighting.TimeOfDay = 12;Lighting.FogColor = Color3.new(0,0,0);Lighting.FogEnd = 10000;Lighting.FogStart = 0;Lighting.GlobalShadows = false
  138. --add logs command
  139. elseif command == "scs" then if string.lower(string.sub(msg,string.len(Prefix)+5,string.len(msg))) == "on" then Prefix = "/e" elseif string.lower(string.sub(msg,string.len(Prefix)+5,string.len(msg))) == "off" then Prefix = BPPrefix end
  140. elseif precommand == "shutdown" then local messagetext = "This server is shutting down...";local screengui = Instance.new("ScreenGui");local frame = Instance.new("TextLabel",screengui);frame.Name = "frame";frame.BackgroundColor3 = Color3.new(47/255,47/255,47/255);frame.BackgroundTransparency = 0.5;frame.Size = UDim2.new(1,0,1,0);frame.Text = "System Message";frame.TextColor3 = Color3.new(1,1,1);frame.FontSize = "Size24";frame.TextStrokeTransparency = 0;frame.TextYAlignment = "Top";local text = Instance.new("TextLabel",frame);text.Name = "text";text.Position = UDim2.new(-0.015,0,0.5,0);text.TextYAlignment = "Top";text.Size = UDim2.new(1,0,0,200); text.BackgroundTransparency = 1;text.FontSize = "Size18";text.TextColor3 = Color3.new(1,1,1);text.TextStrokeTransparency = 0;text.Text = messagetext;for _,v in pairs(game.Players:GetChildren()) do if v.ClassName == "Player" then local clone = screengui:clone();clone.Parent = v.PlayerGui coroutine.resume(coroutine.create(function()wait(5) for i = 1,50 do wait(0.01); clone.frame.BackgroundTransparency = clone.frame.BackgroundTransparency + 0.01;clone.frame.TextTransparency = clone.frame.TextTransparency + 0.02;clone.frame.text.TextTransparency = clone.frame.text.TextTransparency + 0.02;clone.frame.text.TextStrokeTransparency = clone.frame.text.TextStrokeTransparency + 0.02; clone.frame.TextStrokeTransparency = clone.frame.TextStrokeTransparency + 0.02 end clone:remove()end)) end wait(10)for i, v in next, game:GetService"Players":GetPlayers() do v:Kick() end end
  141. elseif precommand == "cmdbar" then for _,v in pairs(Player.PlayerGui:GetChildren()) do if v.Name == "CB" then return end end; local CB = script.CB:clone();CB.Parent = Player.PlayerGui;CB.Frame.Enter.Script.Disabled = false;CB.Frame.Enter.Script.Disabled = true;CB.Frame.Enter.Script.Disabled = false
  142. elseif precommand == "logs" then for _,v in pairs(Player.PlayerGui:GetChildren()) do if v.Name == "CL" then return end end;sc = Instance.new("ScreenGui",Player.PlayerGui);sc.Name = "CL";sf = Instance.new("ScrollingFrame",sc);sf.BackgroundColor3 = Color3.new(0,0,0);sf.BorderColor3 = Color3.new(1,1,1);sf.Position = UDim2.new(0.5,0,0.5,0);sf.Size = UDim2.new(0.3,0,0.3,0);sf.CanvasSize = UDim2.new(0,0,10,0);tl = Instance.new("TextLabel");tl.BackgroundTransparency = 1;tl.Position = UDim2.new(0,0,0,0);tl.Size = UDim2.new(1,-15,0.004,0);tl.Text = "";tl.TextColor3 = Color3.new(1,1,1);tl.TextScaled = true;tl.TextXAlignment = "Left";tb = Instance.new("TextButton",sc);tb.BackgroundColor3 = Color3.new(0,0,0);tb.BorderColor3 = Color3.new(1,1,1);tb.Position = UDim2.new(0.755,0,0.45,0);tb.Size = UDim2.new(0,60,0,30);tb.TextColor3 = Color3.new(1,1,1);tb.TextScaled = true;tb.Text = "EXIT";scripty = script.CB.Frame.Exit.Script:clone();scripty.Parent = tb;tl2 = Instance.new("TextLabel",sc);tl2.BackgroundColor3 = Color3.new(0,0,0);tl2.BorderColor3 = Color3.new(1,1,1);tl2.Position = UDim2.new(0.5,0,0.45,0);tl2.Size = UDim2.new(0,350,0,30);tl2.TextScaled = true;tl2.TextColor3 = Color3.new(1,1,1);tl2.Text = "Command Logs";lastpos = 0 for j = 1,#Log_List do clone = tl:clone();clone.Parent = sf;clone.Text =(j..". "..Log_List[j][1].." - "..Log_List[j][2]);clone.Position = UDim2.new(0,0,0,lastpos);lastpos = lastpos+20 end
  143. elseif precommand == "cmds" or precommand == "commands" then for _,v in pairs(Player.PlayerGui:GetChildren()) do if v.Name == "CS" then return end end;sc = Instance.new("ScreenGui",Player.PlayerGui);sc.Name = "CS";sf = Instance.new("ScrollingFrame",sc);sf.BackgroundColor3 = Color3.new(0,0,0);sf.BorderColor3 = Color3.new(1,1,1);sf.Position = UDim2.new(0.5,0,0.5,0);sf.Size = UDim2.new(0.3,0,0.3,0);sf.CanvasSize = UDim2.new(0,0,10,0);tl = Instance.new("TextLabel");tl.BackgroundTransparency = 1;tl.Position = UDim2.new(0,0,0,0);tl.Size = UDim2.new(1,-15,0.004,0);tl.Text = "";tl.TextColor3 = Color3.new(1,1,1);tl.TextScaled = true;tl.TextXAlignment = "Left";tb = Instance.new("TextButton",sc);tb.BackgroundColor3 = Color3.new(0,0,0);tb.BorderColor3 = Color3.new(1,1,1);tb.Position = UDim2.new(0.755,0,0.45,0);tb.Size = UDim2.new(0,60,0,30);tb.TextColor3 = Color3.new(1,1,1);tb.TextScaled = true;tb.Text = "EXIT";scripty = script.CB.Frame.Exit.Script:clone();scripty.Parent = tb;tl2 = Instance.new("TextLabel",sc);tl2.BackgroundColor3 = Color3.new(0,0,0);tl2.BorderColor3 = Color3.new(1,1,1);tl2.Position = UDim2.new(0.5,0,0.45,0);tl2.Size = UDim2.new(0,350,0,30);tl2.TextScaled = true;tl2.TextColor3 = Color3.new(1,1,1);tl2.Text = "Commands";lastpos = 0 for j = 1,#Command_List do clone = tl:clone();clone.Parent = sf;clone.Text =(j..". "..Command_List[j]);clone.Position = UDim2.new(0,0,0,lastpos);lastpos = lastpos+20 end
  144. elseif precommand == "clean" then for _,v in pairs(game.Workspace:GetChildren()) do if v.ClassName == "Hat" or v.ClassName == "Tool" or v.ClassName == "Board" then v:remove() end end
  145. elseif command == "music" then for _,v in pairs(game.Workspace:GetChildren()) do if v.Name == "CASOUND" then v:remove() end end sound = Instance.new("Sound",game.Workspace);sound.Name = "CASOUND";sound.Looped = true;sound.Volume = 1;sound.SoundId = "http://www.roblox.com/asset/?id="..string.lower(string.sub(msg,string.len(Prefix)+7,string.len(msg)));sound:Play()
  146. elseif precommand == "stopmusic" or precommand == "musicstop" then for _,v in pairs(game.Workspace:GetChildren()) do if v.Name == "CASOUND" then v:remove() end end
  147. elseif precommand == "slock" then if string.lower(string.sub(msg,string.len(Prefix)+7,string.len(msg))) == "on" then SERVERLOCK = true elseif string.lower(string.sub(msg,string.len(Prefix)+7,string.len(msg))) == "off" then SERVERLOCK = false end
  148. elseif precommand == "glock" then if string.lower(string.sub(msg,string.len(Prefix)+7,string.len(msg))) == "on" then GROUPLOCK = true elseif string.lower(string.sub(msg,string.len(Prefix)+7,string.len(msg))) == "off" then GROUPLOCK = false end
  149. end
  150.  
  151. table.insert(Log_List,#Log_List+1,{Player.Name,msg})
  152.  
  153. end
  154.  
  155. end)end)
  156.  
  157.  
  158.  
  159. --[[for i = 1,5 do
  160.     print(Waypoint[i][1],Waypoint[i][2])
  161. end]]
  162.  
  163. --table.insert(targets,(#targets+1),string.sub(msg,string.len(Prefix)+string.len(command)+2,t-1))
  164. --[[for i = 1,#targets do
  165. for _,v in pairs(game.Players:GetChildren()) do
  166. if v.Name == targets[i] then game.Workspace:FindFirstChild(v.Name).Humanoid.Health = 0 end
  167. end
  168. end--]]
  169.  
  170. --if command == "change" then pdone = false;for l = start+string.len(last)+1,string.len(msg) do if string.sub(msg,l,l) == " " and pdone == false then pokename = string.sub(msg,start+string.len(last)+1,l-1) pdone = true end end sdone = false;for m = start+string.len(last)+2+string.len(pokename),string.len(msg) do if string.sub(msg,m,m) == " " and sdone == false then sdone = true stat = string.sub(msg,start+string.len(last)+2+string.len(pokename),m-1) end end statvalue = string.sub(msg,start+string.len(last)+3+string.len(pokename)+string.len(stat));for i = 1,#targets do for _,v in pairs(game.Players:GetChildren()) do if v.Name == targets[i] then v:FindFirstChild("stats"):FindFirstChild(pokename):FindFirstChild(stat).Value = statvalue end end end
  171. --elseif command == "give" then for i = 1,#targets do for _,v in pairs(game.Players:GetChildren()) do if v.Name == targets[i] then for _,j in pairs(game.Lighting.Moves:GetChildren()) do if string.lower(string.sub(j.Name,1,string.len(value)-1)) == string.lower(string.sub(value,2,string.len(value))) then local moveclone = j:clone();moveclone.Parent = v.Backpack end end end end end
  172. --end
  173.  
  174.  
  175.  
  176.  
  177. --
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement