ryghost

Commands

Aug 19th, 2019
744
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local Functions = Arsenic.Functions
  2. local Environment = Arsenic.Environment
  3. local Graphics = Arsenic.Graphics
  4.  
  5. local Local = Functions.Local
  6. local Players = Functions.Players
  7. local Server = Functions.Server
  8. local Vehicles = Functions.Vehicles
  9. local Particles = Functions.Particles
  10. local Banishment = Functions.Banishment
  11. local Weapons = Functions.Weapons
  12. local Structures = Functions.Structures
  13. local Cloning = Functions.Cloning
  14.  
  15. local Tabs = Graphics.Interface.Drag.Body.Tabs
  16.  
  17. local Commands = {}
  18.  
  19. local function RunList(list, func, ...)
  20.     local Vargs = {...}
  21.     for i,v in next, list do
  22.         spawn(function()
  23.             func(v, unpack(Vargs))
  24.         end)
  25.     end
  26. end
  27.  
  28. local function RunListAsync(list, func, ...)
  29.     local Vargs = {...}
  30.     for i,v in next, list do
  31.         func(v, unpack(Vargs))
  32.     end
  33. end
  34.  
  35. local function FindPlayer(player)
  36.     local Caller = Environment.GetLocals(2).caller
  37.  
  38.     local PlayerOptions = {
  39.         me = Caller,
  40.         others = (function()
  41.             local Return = {}
  42.             for i,v in next, game:GetService('Players'):GetPlayers() do
  43.                 if v ~= Caller then
  44.                     table.insert(Return, v)
  45.                 end
  46.             end
  47.             return Return
  48.         end)(),
  49.         all = game:GetService('Players'):GetPlayers()
  50.     }
  51.  
  52.     local Option = rawget(PlayerOptions, player)
  53.     if Option then
  54.         return Option
  55.     end
  56.  
  57.     return Arsenic.Find(game:GetService('Players'):GetPlayers(), player)
  58. end
  59.  
  60. local function FindMaterial(material)
  61.     local Materials = {
  62.     "Plastic",
  63.     "Wood",
  64.     "Slate",
  65.     "Concrete",
  66.     "CorrodedMetal",
  67.     "DiamondPlate",
  68.     "Foil",
  69.     "Grass",
  70.     "Ice",
  71.     "Marble",
  72.     "Granite",
  73.     "Brick",
  74.     "Pebble",
  75.     "Sand",
  76.     "Fabric",
  77.     "SmoothPlastic",
  78.     "Metal",
  79.     "WoodPlanks",
  80.     "Cobblestone",
  81.     "Neon",
  82.     "Glass"}
  83.     for i,v in next, Materials do
  84.         if v:sub(1, material:len()):lower() == material:lower() then
  85.             return v
  86.         end
  87.     end
  88. end
  89.  
  90. local function FindItem(item)
  91.     if item:lower() == 'all' then
  92.         return game:GetService('Lighting').LootDrops:GetChildren()
  93.     end
  94.  
  95.     if item:lower() == 'm14' then
  96.         if Arsenic.Environment.Place ~= 'Mods' then
  97.             return 'M14'
  98.         end
  99.         return game:GetService('Lighting').LootDrops.M14
  100.     end
  101.  
  102.     if Arsenic.Environment.Place ~= 'Mods' then
  103.         return Arsenic.Find(game:GetService('Lighting').LootDrops:GetChildren(), item)
  104.     else
  105.         return Arsenic.FindRaw(game:GetService('Lighting').LootDrops:GetChildren(), item)
  106.     end
  107. end
  108.  
  109. local function FindVehicle(vehicle)
  110.     if vehicle:lower() == 'all' then
  111.         return workspace.Vehicles:GetChildren()
  112.     end
  113.  
  114.     return Arsenic.Find(workspace.Vehicles:GetChildren(), vehicle)
  115. end
  116.  
  117. local function FindWeapon(player, weapon)
  118.     for i,v in next, player.Backpack:GetChildren() do
  119.         if v:FindFirstChild('Shooter') and v.Name:sub(1, weapon:len()):lower() == weapon:lower() then
  120.             return v
  121.         end
  122.     end
  123. end
  124.  
  125. local function FindCity(city)
  126.     return Arsenic.Find(workspace['Anchored Objects']['Towns/Cities']:GetChildren(), city)
  127. end
  128.  
  129. local function FindLocation(location)
  130.     return Arsenic.Find(workspace.Locations:GetChildren(), location)
  131. end
  132.  
  133. local function FindDeletedVehicle(vehicle)
  134.     local vehicles = {}
  135.     for i,v in next, game:GetService('ReplicatedStorage'):GetChildren() do
  136.         if v:FindFirstChild('Seats') then
  137.             table.insert(vehicles, v)
  138.         end
  139.     end
  140.  
  141.     if item:lower() == 'all' then
  142.         return vehicles
  143.     end
  144.  
  145.     return Arsenic.Find(vehicles, vehicle)
  146. end
  147.  
  148. local function AppendChecks(checks)
  149.     local function GetRank(player)
  150.         local Ranks = {
  151.             Normie = 1,
  152.             Mod = 2,
  153.             Admin = 3,
  154.             Root = 4
  155.         }
  156.         return rawget(Ranks, Arsenic.GetRank(player))
  157.     end
  158.  
  159.     local Caller = Environment.GetLocals(2).caller
  160.     local Player = Environment.GetLocals(2).player
  161.  
  162.     if (checks.HierarchyCheck and (GetRank(Caller) < GetRank(Player)))
  163.     or (checks.RootCheck and (Caller ~= Arsenic.Client))
  164.     or (checks.AllCheck and (rawget(checks, 1) == 'all' or rawget(checks, 1) == 'others'))
  165.     or (checks.ValueCheck and not rawget(checks, 1)) then
  166.         return
  167.     end
  168.    
  169.     return true
  170. end
  171.  
  172. local function TickCheck(check, value)
  173.     if not value then
  174.         check.Label.Font = 'SourceSansSemibold'
  175.         check.Text = ''
  176.         return
  177.     end
  178.     check.Label.Font = 'SourceSansBold'
  179.     check.Text = '✓'
  180. end
  181.  
  182. -- Commands
  183.  
  184. -- Local
  185. function Commands.cmds(caller)
  186.     if not AppendChecks({RootCheck = true}) then
  187.         return 'Invalid caller'
  188.     end
  189.     Graphics.Interface.DragC.Visible = true
  190. end
  191.  
  192. function Commands.setprefix(caller, new)
  193.     if not AppendChecks({RootCheck = true}) then
  194.         return 'Invalid caller'
  195.     end
  196.  
  197.     if new:len() ~= 1 then
  198.         return 'Prefix must be, exactly, ONE character'
  199.     end
  200.  
  201.     Arsenic.Variables.Prefix = new
  202.     return 'Set chat prefix to ' .. new
  203. end
  204.  
  205. function Commands.ws(caller, value)
  206.     value = tonumber(value)
  207.     if not AppendChecks({RootCheck = true, ValueCheck = true, value}) then
  208.         return 'Invalid caller/arguments'
  209.     end
  210.  
  211.     Local.SetWalkSpeed(value)
  212.     return 'Set client speed to ' .. value
  213. end
  214.  
  215. function Commands.jp(caller, value)
  216.     value = tonumber(value)
  217.     if not AppendChecks({RootCheck = true, ValueCheck = true, value}) then
  218.         return 'Invalid caller/arguments'
  219.     end
  220.  
  221.     Local.SetJumpPower(value)
  222.     return 'Set client jump power to ' .. value
  223. end
  224.  
  225. function Commands.unlockcam(caller)
  226.     if not AppendChecks({RootCheck = true}) then
  227.         return 'Invalid caller'
  228.     end
  229.  
  230.     Local.SetZoom(133742069)
  231.     return 'Unlocked client\'s max camera zoom'
  232. end
  233.  
  234. function Commands.nofog(caller)
  235.     if not AppendChecks({RootCheck = true}) then
  236.         return 'Invalid caller'
  237.     end
  238.  
  239.     Local.SetFog(133742069)
  240.     return 'Removed client\'s fog'
  241. end
  242.  
  243. function Commands.heal(caller)
  244.     if not AppendChecks{RootCheck = true} then
  245.         return 'Invalid caller'
  246.     end
  247.    
  248.     Arsenic('AddHealth', 100, 0)
  249.     return 'Healed client'
  250. end
  251.  
  252. function Commands.fly(caller)
  253.     if not AppendChecks{RootCheck = true} then
  254.         return 'Invalid caller'
  255.     end
  256.    
  257.     if Arsenic.Loops.Flying then
  258.         return 'Flight is already enabled'
  259.     end
  260.  
  261.     TickCheck(Tabs.Local.Toggles.Fly, true)
  262.     spawn(function() Local.Fly(true) end)
  263.     return 'Enabled client flight'
  264. end
  265.  
  266. function Commands.unfly(caller)
  267.     if not AppendChecks{RootCheck = true} then
  268.         return 'Invalid caller'
  269.     end
  270.    
  271.     if not Arsenic.Loops.Flying then
  272.         return 'Flight is not enabled'
  273.     end
  274.  
  275.     TickCheck(Tabs.Local.Toggles.Fly, false)
  276.     Local.Fly(false)
  277.     return 'Disabled client flight'
  278. end
  279.  
  280. function Commands.spec(caller, player)
  281.     if not AppendChecks({RootCheck = true, AllCheck = true, player}) then
  282.         return 'Invalid caller/arguments'
  283.     end
  284.  
  285.     player = FindPlayer(player)
  286.  
  287.     Local.Spectate(player)
  288.     return 'Spectating ' .. player.Name
  289. end
  290.  
  291. function Commands.glowstick(caller)
  292.     if not AppendChecks({RootCheck = true}) then
  293.         return 'Invalid caller'
  294.     end
  295.  
  296.     if Arsenic.Loops.Glowstick then
  297.         return 'Glowstick is already enabled'
  298.     end
  299.  
  300.     TickCheck(Tabs.Local.Toggles.Glowstick, true)
  301.     Local.Glowstick(true)
  302.     return 'Enabled client glowstick effect'
  303. end
  304.  
  305. function Commands.unglowstick(caller)
  306.     if not AppendChecks({RootCheck = true}) then
  307.         return 'Invalid caller'
  308.     end
  309.  
  310.     if not Arsenic.Loops.Glowstick then
  311.         return 'Glowstick is not enabled'
  312.     end
  313.  
  314.     TickCheck(Tabs.Local.Toggles.Glowstick, false)
  315.     Local.Glowstick(false)
  316.     return 'Disabled client glowstick effect'
  317. end
  318.  
  319. function Commands.autoheal(caller)
  320.     if not AppendChecks({RootCheck = true}) then
  321.         return 'Invalid caller'
  322.     end
  323.  
  324.     Local.Autoheal(true)
  325.     return 'Enabled client auto-heal'
  326. end
  327.  
  328. function Commands.noautoheal(caller)
  329.     if not AppendChecks({RootCheck = true}) then
  330.         return 'Invalid caller'
  331.     end
  332.  
  333.     Local.Autoheal(false)
  334.     return 'Disabled client auto-heal'
  335. end
  336.  
  337. function Commands.admin(caller, player)
  338.     if not AppendChecks({RootCheck = true, AllCheck = true, player}) then
  339.         return 'Invalid caller/arguments'
  340.     end
  341.     player = FindPlayer(player)
  342.     Players.SetAdmin(player, true)
  343.     return 'Gave admin perms to ' .. player.Name
  344. end
  345.  
  346. function Commands.mod(caller, player)
  347.     if not AppendChecks({RootCheck = true, AllCheck = true, player}) then
  348.         return 'Invalid caller/arguments'
  349.     end
  350.     player = FindPlayer(player)
  351.     Players.SetMod(player, true)
  352.     return 'Gave mod perms to ' .. player.Name
  353. end
  354.  
  355. function Commands.unadmin(caller, player)
  356.     if not AppendChecks({RootCheck = true, AllCheck = true, player}) then
  357.         return 'Invalid caller/arguments'
  358.     end
  359.     player = FindPlayer(player)
  360.     Players.SetAdmin(player, false)
  361.     return 'Removed admin perms from' .. player.Name
  362. end
  363.  
  364. function Commands.unmod(caller, player)
  365.     if not AppendChecks({RootCheck = true, AllCheck = true, player}) then
  366.         return 'Invalid caller/arguments'
  367.     end
  368.     player = FindPlayer(player)
  369.     Players.SetMod(player, false)
  370.     return 'Removed mod perms from ' .. player.Name
  371. end
  372.  
  373. -- Players
  374.  
  375. function Commands.shirt(caller, player, id)
  376.     id = tonumber(id)
  377.     if not AppendChecks({ValueCheck = true, id}) then
  378.         return 'Invalid ID value'
  379.     end
  380.  
  381.     player = FindPlayer(player)
  382.  
  383.     if type(player) == 'table' then
  384.         RunListAsync(player, Players.Shirt, id)
  385.         return 'Changed everybody\'s shirt ID to ' .. id
  386.     end
  387.  
  388.     Players.Shirt(player, id)
  389.     return 'Changed ' .. player.Name .. '\'s shirt ID to ' .. id
  390. end
  391.  
  392. function Commands.pants(caller, player, id)
  393.     id = tonumber(id)
  394.     if not AppendChecks({ValueCheck = true, id}) then
  395.         return 'Invalid ID value'
  396.     end
  397.  
  398.     player = FindPlayer(player)
  399.  
  400.     if type(player) == 'table' then
  401.         RunListAsync(player, Players.Pants, id)
  402.         return 'Changed everybody\'s pants ID to ' .. id
  403.     end
  404.  
  405.     Players.Pants(player, id)
  406.     return 'Changed ' .. player.Name .. '\'s pants ID to ' .. id
  407. end
  408.  
  409. function Commands.tp(caller, player, player2)
  410.     if not AppendChecks({HierarchyCheck = true, AllCheck = true, player2}) then
  411.         return 'Invalid arguments'
  412.     end
  413.  
  414.     player = FindPlayer(player)
  415.     player2 = FindPlayer(player2)
  416.  
  417.     if type(player) == 'table' then
  418.         RunList(player, Players.Teleport, player2)
  419.         return 'Teleported players to ' .. player2.Name
  420.     end
  421.  
  422.     Players.Teleport(player, player2)
  423.     return 'Teleported ' .. player.Name .. ' to ' .. player2.Name
  424. end
  425.  
  426. function Commands.loc(caller, player, location)
  427.     player = FindPlayer(player)
  428.     location = FindLocation(location)
  429.  
  430.     if type(player) == 'table' then
  431.         RunList(player, Players.Teleport, location, true)
  432.         return 'Teleported players to ' .. location.Name
  433.     end
  434.  
  435.     Players.Teleport(player, location, true)
  436.     return 'Teleported ' .. player.Name .. ' to ' .. location.Name
  437. end
  438.  
  439. function Commands.hunger(caller, player, value)
  440.     value = tonumber(value)
  441.     if not AppendChecks({ValueCheck = true, value}) then
  442.         return 'Invalid value'
  443.     end
  444.  
  445.     player = FindPlayer(player)
  446.  
  447.     if type(player) == 'table' then
  448.         RunList(Player, Players.SetHunger, value)
  449.         return 'Set all players\'s hunger to ' .. value
  450.     end
  451.  
  452.     Players.SetHunger(player, value)
  453.     return 'Set ' .. player.Name .. '\'s hunger to ' .. value
  454. end
  455.  
  456. function Commands.thirst(caller, player, value)
  457.     value = tonumber(value)
  458.     if not AppendChecks({ValueCheck = true, value}) then
  459.         return 'Invalid value'
  460.     end
  461.  
  462.     player = FindPlayer(player)
  463.  
  464.     if type(player) == 'table' then
  465.         RunList(player, Players.SetThirst, value)
  466.         return 'Set all players\'s thirst to ' .. value
  467.     end
  468.  
  469.     Players.SetThirst(player, value)
  470.     return 'Set ' .. player.Name .. '\'s thirst to ' .. value
  471. end
  472.  
  473. function Commands.infvitals(caller, player)
  474.     player = FindPlayer(player)
  475.  
  476.     if type(player) == 'table' then
  477.         RunList(player, Players.SetHunger, 99999)
  478.         return 'Set all players\'s vitals to 99999'
  479.     end
  480.  
  481.     Players.SetThirst(player, 99999)
  482.     Players.SetHunger(player, 99999)
  483.     return 'Set ' .. player.Name .. '\'s vitals to 99999'
  484. end
  485.  
  486. function Commands.stamina(caller, player, value)
  487.     value = tonumber(value)
  488.     if not AppendChecks({ValueCheck = true, value}) then
  489.         return 'Invalid value'
  490.     end
  491.  
  492.     player = FindPlayer(player)
  493.  
  494.     if type(player) == 'table' then
  495.         RunList(Player, Players.SetStamina, value)
  496.         return 'Set all players\'s stamina to ' .. value
  497.     end
  498.  
  499.     Players.SetStamina(player, value)
  500.     return 'Set ' .. player.Name .. '\'s stamina to ' .. value
  501. end
  502.  
  503. function Commands.clog(caller, player)
  504.     player = FindPlayer(player)
  505.  
  506.     if type(player) == 'table' then
  507.         RunList(player, Players.CombatLog, true)
  508.         return 'Combat logged players'
  509.     end
  510.  
  511.     Players.CombatLog(player, true)
  512.     return 'Combat logged ' .. player.Name
  513. end
  514.  
  515. function Commands.days(caller, player, value)
  516.     value = tonumber(value)
  517.     if not AppendChecks({ValueCheck = true, value}) then
  518.         return 'Invalid value'
  519.     end
  520.  
  521.     player = FindPlayer(player)
  522.  
  523.     if type(player) == 'table' then
  524.         RunList(player, Players.SetDays, value)
  525.         return 'Set all players\'s days to ' .. value
  526.     end
  527.  
  528.     Players.SetDays(player, value)
  529.     return 'Set ' .. player.Name .. '\'s days to ' .. value
  530. end
  531.  
  532. function Commands.pkills(caller, player, value)
  533.     value = tonumber(value)
  534.     if not AppendChecks({ValueCheck = true, value}) then
  535.         return 'Invalid value'
  536.     end
  537.  
  538.     player = FindPlayer(player)
  539.  
  540.     if type(player) == 'table' then
  541.         RunList(player, Players.SetPlayers, value)
  542.         return 'Set all players\'s player kills to ' .. value
  543.     end
  544.  
  545.     Players.SetPlayers(player, value)
  546.     return 'Set ' .. player.Name .. '\'s player kills to ' .. value
  547. end
  548.  
  549. function Commands.zkills(caller, player, value)
  550.     value = tonumber(value)
  551.     if not AppendChecks({ValueCheck = true, value}) then
  552.         return 'Invalid value'
  553.     end
  554.  
  555.     player = FindPlayer(player)
  556.  
  557.     if type(player) == 'table' then
  558.         RunList(player, Players.SetZombies, value)
  559.         return 'Set all players\'s zombie kills to ' .. value
  560.     end
  561.  
  562.     Players.SetZombies(player, value)
  563.     return 'Set ' .. player.Name .. '\'s zombie kills to ' .. value
  564. end
  565.  
  566. -- Server
  567.  
  568. function Commands.lootmod(caller, value)
  569.     value = tonumber(value)
  570.     if not AppendChecks({ValueCheck = true, value}) then
  571.         return 'Invalid arguments'
  572.     end
  573.  
  574.     Server.LootRate(value)
  575.     return 'Changed server loot rate to ' .. value  
  576. end
  577.  
  578. function Commands.spawn(caller, player, item, amount)
  579.     if not AppendChecks({AllCheck = true, item}) then
  580.         return 'Invalid arguments'
  581.     end
  582.  
  583.     player = FindPlayer(player)
  584.     item = FindItem(item)
  585.     amount = tonumber(amount)
  586.    
  587.     if not amount then
  588.         amount = 1
  589.     end
  590.  
  591.     if type(player) == 'table' then
  592.         RunList(player, Server.Spawn, item, amount)
  593.         return 'Spawned items on players'
  594.     end
  595.     Server.Spawn(player, item, amount)
  596.     return 'Spawned ' .. item.Name .. ' on ' .. player.Name
  597. end
  598.  
  599. function Commands.clearloot(caller)
  600.     Server.ClearLoot()
  601.     return 'Cleared all spawned loot'
  602. end
  603.  
  604. -- Vehicles
  605.  
  606. function Commands.vspeed(caller, vehicle, value)
  607.     value = tonumber(value)
  608.     if not AppendChecks({ValueCheck = true, value}) then
  609.         return 'Invalid arguments'
  610.     end
  611.  
  612.     vehicle = FindVehicle(vehicle)
  613.  
  614.     if type(vehicle) == 'table' then
  615.         RunList(vehicle, Vehicles.Speed, value)
  616.         return 'Set all vehicles\' speed values to ' .. value
  617.     end
  618.  
  619.     Vehicles.Speed(vehicle, value)
  620.     return 'Set ' .. vehicle.Name .. '\'s sped value to ' .. value
  621. end
  622.  
  623. function Commands.vgod(caller, vehicle)
  624.     vehicle = FindVehicle(vehicle)
  625.     if type(vehicle) == 'table' then
  626.         RunList(vehicle, Vehicles.God)
  627.         return 'Godded all vehicles'
  628.     end
  629.  
  630.     Vehicles.God(vehicle)
  631.     return 'Godded ' .. vehicle.Name
  632. end
  633.  
  634. function Commands.vexplode(caller, vehicle)
  635.     vehicle = FindVehicle(vehicle)
  636.     if type(vehicle) == 'table' then
  637.         RunList(vehicle, Vehicles.Explode)
  638.         return 'Exploded all vehicles'
  639.     end
  640.  
  641.     Vehicles.Explode(vehicle)
  642.     return 'Exploded ' .. vehicle.Name
  643. end
  644.  
  645. function Commands.vtp(caller, player, vehicle)
  646.     if not AppendChecks({AllCheck = true, vehicle}) then
  647.         return 'Invalid arguments'
  648.     end
  649.  
  650.     vehicle = FindVehicle(vehicle)
  651.     player = FindPlayer(player)
  652.  
  653.     if type(player) == 'table' then
  654.         RunList(player, Vehicles.Teleport, vehicle)
  655.         return 'Teleported all players to ' .. vehicle.Name
  656.     end
  657.  
  658.     Vehicles.Teleport(player, vehicle)
  659.     return 'Teleported ' .. player.Name .. ' to ' .. vehicle.Name
  660. end
  661.  
  662. function Commands.vbring(caller, vehicle, player)
  663.     if not AppendChecks({AllCheck = true, player}) then
  664.         return 'Invalid arguments'
  665.     end
  666.  
  667.     vehicle = FindVehicle(vehicle)
  668.     player = FindPlayer(player)
  669.  
  670.     if type(vehicle) == 'table' then
  671.         RunList(vehicle, Vehicles.Bring, player)
  672.         return 'Brought all vehicles to ' .. player.Name
  673.     end
  674.  
  675.     Vehicles.Bring(vehicle, player)
  676.     return 'Brought ' .. vehicle.Name .. ' to ' .. player.Name
  677. end
  678.  
  679. function Commands.vclone(caller, vehicle, player)
  680.     if not AppendChecks({AllCheck = true, vehicle}) then
  681.         return 'Invalid arguments'
  682.     end
  683.  
  684.     vehicle = FindVehicle(vehicle)
  685.     player = FindPlayer(player)
  686.  
  687.     if type(player) == 'table' then
  688.         RunListAsync(player, Vehicles.Clone, vehicle)
  689.         return 'Cloned ' .. vehicle.Name ' to players'
  690.     end
  691.  
  692.     Vehicles.Clone(vehicle , player)
  693.     return 'Cloned ' .. vehicle.Name .. ' to ' .. player.Name
  694. end
  695.  
  696. function Commands.vopacity(caller, vehicle, value)
  697.     value = tonumber(value)
  698.     if not AppendChecks({ValueCheck = true, value}) then
  699.         return 'Invalid parameters'
  700.     end
  701.  
  702.     vehicle = FindVehicle(vehicle)
  703.     if type(vehicle) == 'table' then
  704.         RunList(vehicle, Vehicles.Opacity, value)
  705.         return 'Changed all vehicles\' opacities to ' .. value
  706.     end
  707.  
  708.     Vehicles.Opacity(vehicle, value)
  709.     return 'Changed ' .. vehicle.Name .. '\'s opacity to ' .. value
  710. end
  711.  
  712. function Commands.vmat(caller, vehicle, value)
  713.     vehicle = FindVehicle(vehicle)
  714.     value = FindMaterial(value)
  715.  
  716.     if not value then
  717.         return 'Invalid parameters'
  718.     end
  719.  
  720.     if type(vehicle) == 'table' then
  721.         RunList(vehicle, Vehicles.Material, value)
  722.         return 'Changed all vehicles\' material to ' .. value
  723.     end
  724.  
  725.     Vehicles.Material(vehicle, value)
  726.     return 'Changed ' .. vehicle.Name .. '\'s material to ' .. tostring(value)
  727. end
  728.  
  729. function Commands.vbreak(caller, vehicle)
  730.     vehicle = FindVehicle(vehicle)
  731.     if type(vehicle) == 'table' then
  732.         RunList(vehicle, Vehicles.Break)
  733.         return 'Broke all vehicles'
  734.     end
  735.  
  736.     Vehicles.Break(vehicle)
  737.     return 'Broke ' .. vehicle.Name
  738. end
  739.  
  740. function Commands.vdelete(caller, vehicle)
  741.     vehicle = FindVehicle(vehicle)
  742.     if type(vehicle) == 'table' then
  743.         RunList(vehicle, Vehicles.Remove)
  744.         return 'Deleted all vehicles'
  745.     end
  746.  
  747.     Vehicles.Remove(vehicle)
  748.     return 'Deleted ' .. vehicle.Name
  749. end
  750.  
  751. function Commands.vadd(caller, vehicle)
  752.     vehicle = FindDeletedVehicle(vehicle)
  753.     if type(vehicle) == 'table' then
  754.         RunList(vehicle, Vehicles.Replenish)
  755.         return 'Replenished all deleted vehicles'
  756.     end
  757.    
  758.     Vehicles.Replenish(vehicle)
  759.     return 'Replenished ' .. vehicle.Name
  760. end
  761.  
  762. -- Particles
  763.  
  764. function Commands.sparkles(caller, player)
  765.     player = FindPlayer(player)
  766.     if type(player) == 'table' then
  767.         RunListAsync(player, Particles.Sparkles)
  768.         return 'Sparkles created in players'
  769.     end
  770.  
  771.     Particles.Sparkles(player)
  772.     return 'Sparkles create in ' .. player.Name
  773. end
  774.  
  775. function Commands.smoke(caller, player)
  776.     player = FindPlayer(player)
  777.     if type(player) == 'table' then
  778.         RunListAsync(player, Particles.Smoke)
  779.         return 'Smoke created in players'
  780.     end
  781.  
  782.     Particles.Smoke(player)
  783.     return 'Smoke create in ' .. player.Name
  784. end
  785.  
  786. function Commands.fire(caller, player)
  787.     player = FindPlayer(player)
  788.     if type(player) == 'table' then
  789.         RunListAsync(player, Particles.Fire)
  790.         return 'Fire created in players'
  791.     end
  792.  
  793.     Particles.Fire(player)
  794.     return 'Fire create in ' .. player.Name
  795. end
  796.  
  797. function Commands.unsparkles(caller, player)
  798.     player = FindPlayer(player)
  799.     if type(player) == 'table' then
  800.         RunList(player, Particles.Remove, 'Sparkles')
  801.         return 'Deleted sparkles in players'
  802.     end
  803.  
  804.     Particles.Remove(player, 'Sparkles')
  805.     return 'Deleted sparkles in ' .. player.Name
  806. end
  807.  
  808. function Commands.unsmoke(caller, player)
  809.     player = FindPlayer(player)
  810.     if type(player) == 'table' then
  811.         RunList(player, Particles.Remove, 'BuildingSmoke')
  812.         return 'Deleted smoke in players'
  813.     end
  814.  
  815.     Particles.Remove(player, 'BuildingSmoke')
  816.     return 'Deleted smoke in ' .. player.Name
  817. end
  818.  
  819. function Commands.unfire(caller, player)
  820.     player = FindPlayer(player)
  821.     if type(player) == 'table' then
  822.         RunList(player, Particles.Remove, 'FireEffect')
  823.         return 'Deleted fire in players'
  824.     end
  825.  
  826.     Particles.Remove(player, 'FireEffect')
  827.     return 'Deleted fire in ' .. player.Name
  828. end
  829.  
  830. -- Physical
  831.  
  832. function Commands.face(caller, player)
  833.     player = FindPlayer(player)
  834.     if type(player) == 'table' then
  835.         RunList(player, Players.ShowFace, true)
  836.         return 'Made all players\' faces visible'
  837.     end
  838.  
  839.     Players.ShowFace(player, true)
  840.     return 'Made ' .. player.Name .. '\'s face visible'
  841. end
  842.  
  843. function Commands.noface(caller, player)
  844.     player = FindPlayer(player)
  845.     if type(player) == 'table' then
  846.         RunList(player, Players.ShowFace, false)
  847.         return 'Made all players\' faces invisible'
  848.     end
  849.  
  850.     Players.ShowFace(player, false)
  851.     return 'Made ' .. player.Name .. '\'s face invisible'
  852. end
  853.  
  854. function Commands.faceswap(caller, player, player2)
  855.     if (player == 'others' or players == 'all') or player2 == 'others' or player2 == 'all' then
  856.         return 'Invalid parameters'
  857.     end
  858.  
  859.     player = FindPlayer(player)
  860.     player2 = FindPlayer(player2)
  861.  
  862.     Arsenic.Functions.Players.FaceSwap(player, player2)
  863.     return 'Faceswapped ' .. player.Name .. ' and ' .. player2.Name
  864. end
  865.  
  866. function Commands.vest(caller, player)
  867.     player = FindPlayer(player)
  868.     if type(player) == 'table' then
  869.         RunList(player, Players.ShowVest, true)
  870.         return 'Made all players\' vests visible'
  871.     end
  872.  
  873.     Players.ShowVest(player, true)
  874.     return 'Made ' .. player.Name .. '\'s vest visible'
  875. end
  876.  
  877. function Commands.novest(caller, player)
  878.     player = FindPlayer(player)
  879.     if type(player) == 'table' then
  880.         RunList(player, Players.ShowVest, false)
  881.         return 'Made all players\' vests invisible'
  882.     end
  883.  
  884.     Players.ShowVest(player, false)
  885.     return 'Made ' .. player.Name .. '\'s vest invisible'
  886. end
  887.  
  888. function Commands.opacity(caller, player, value)
  889.     value = tonumber(value)
  890.     if not AppendChecks({ValueCheck = true, value}) then
  891.         return 'Invalid value'
  892.     end
  893.    
  894.     player = FindPlayer(player)
  895.     if type(player) == 'table' then
  896.         RunList(player, Players.Visibility, value)
  897.         return 'Set players\' character opacity to ' .. value
  898.     end
  899.  
  900.     Players.Visibility(player, value)
  901.     return 'Set ' .. player.Name .. ' opacity to ' .. value
  902. end
  903.  
  904. -- Banishment
  905.  
  906. function Commands.kill(caller, player)
  907.     if not AppendChecks({HierarchyCheck = true}) then
  908.         return 'Invalid caller'
  909.     end
  910.     player = FindPlayer(player)
  911.     if type(player) == 'table' then
  912.         RunListAsync(player, Banishment.Kill)
  913.         return 'Killed players'
  914.     end
  915.  
  916.     Banishment.Kill(player)
  917.     return 'Killed ' .. player.Name
  918. end
  919.  
  920. function Commands.boom(caller, player)
  921.     if not AppendChecks({HierarchyCheck = true}) then
  922.         return 'Invalid caller'
  923.     end
  924.     player = FindPlayer(player)
  925.     if type(player) == 'table' then
  926.         RunList(player, Banishment.Explode)
  927.         return 'Exploded players'
  928.     end
  929.  
  930.     Banishment.Explode(player)
  931.     return 'Exploded ' .. player.Name
  932. end
  933.  
  934. function Commands.kick(caller, player)
  935.     player = FindPlayer(player)
  936.     if type(player) == 'table' then
  937.         RunListAsync(player, Banishment.Kick)
  938.         return 'Kicked players'
  939.     end
  940.  
  941.     Banishment.Kick(player)
  942.     return 'Kicked ' .. player.Name
  943. end
  944.  
  945. function Commands.ban(caller, player)
  946.     player = FindPlayer(player)
  947.     if type(player) == 'table' then
  948.         RunListAsync(player, Banishment.Ban)
  949.         return 'Banned players'
  950.     end
  951.  
  952.     Banishment.Ban(player)
  953.     return 'Banned ' .. player.Name
  954. end
  955.  
  956. function Commands.unban(caller, player)
  957.     local Bans = Arsenic.Storage.Bans
  958.     if player == 'all' then
  959.         RunListAsync(Bans, Banishment.Unban)
  960.         return 'Cleared bans'
  961.     end
  962.     player = Arsenic.FindRaw(Bans, player)
  963.     Banishment.Unban(player)
  964.     return 'Unbanned ' .. player
  965. end
  966.  
  967. function Commands.punish(caller, player)
  968.     player = FindPlayer(player)
  969.     if type(player) == 'table' then
  970.         RunListAsync(player, Banishment.Punish)
  971.         return 'Punished players'
  972.     end
  973.  
  974.     Banishment.Punish(player)
  975.     return 'Punished ' .. player.Name
  976. end
  977.  
  978. function Commands.unpunish(caller, player)
  979.     player = FindPlayer(player)
  980.     if type(player) == 'table' then
  981.         RunListAsync(player, Banishment.Unpunish)
  982.         return 'Unpunished players'
  983.     end
  984.  
  985.     Banishment.Unpunish(player)
  986.     return 'Unpunished ' .. player.Name
  987. end
  988.  
  989. function Commands.crash(caller, player)
  990.     player = FindPlayer(player)
  991.     if type(player) == 'table' then
  992.         RunListAsync(player, Banishment.Crash)
  993.         return 'Crashed players'
  994.     end
  995.  
  996.     Banishment.Crash(player)
  997.     return 'Crashed ' .. player.Name
  998. end
  999.  
  1000. function Commands.trip(caller, player)
  1001.     player = FindPlayer(player)
  1002.     if type(player) == 'table' then
  1003.         RunList(player, Banishment.Trip)
  1004.         return 'Tripped players'
  1005.     end
  1006.  
  1007.     Banishment.Trip(player)
  1008.     return 'Tripped ' .. player.Name
  1009. end
  1010.  
  1011. function Commands.nohum(caller, player)
  1012.     player = FindPlayer(player)
  1013.     if type(player) == 'table' then
  1014.         RunList(player, Banishment.SetHumanoid, false)
  1015.         return 'Removed players\' humanoids'
  1016.     end
  1017.  
  1018.     Banishment.SetHumanoid(player, false)
  1019.     return 'Removed ' .. player.Name .. '\'s humanoid'
  1020. end
  1021.  
  1022. function Commands.hum(caller, player)
  1023.     player = FindPlayer(player)
  1024.     if type(player) == 'table' then
  1025.         RunListAsync(player, Banishment.SetHumanoid, true)
  1026.         return 'Replenished players\' humanoids'
  1027.     end
  1028.  
  1029.     Banishment.SetHumanoid(player, true)
  1030.     return 'Replenished ' .. player.Name .. '\'s humanoid'
  1031. end
  1032.  
  1033. -- Weapons
  1034.  
  1035. function Commands.setrecoil(caller, player, weapon, amount)
  1036.     amount = tonumber(amount)
  1037.     if not AppendChecks({ValueCheck = true, amount}) or (player == 'all' or player == 'others') then
  1038.         return 'Invalid parameters'
  1039.     end
  1040.  
  1041.     player = FindPlayer(player)
  1042.     weapon = FindWeapon(player, weapon)
  1043.  
  1044.     if not amount or amount <= 0 then
  1045.         amount = 1
  1046.     end
  1047.  
  1048.     Weapons.SetRecoil(player, weapon, amount)
  1049.  
  1050.     return 'Changed ' .. player.Name .. '\'s ' .. weapon.Name .. ' to '
  1051. end
  1052.  
  1053. function Commands.norecoil(caller, player, weapon)
  1054.     if not AppendChecks({AllCheck = true, player}) then
  1055.         return 'Invalid parameters'
  1056.     end
  1057.  
  1058.     player = FindPlayer(player)
  1059.     weapon = FindWeapon(player, weapon)
  1060.  
  1061.     Weapons.SetRecoil(player, weapon, 1)    
  1062.  
  1063.     return 'Reduced recoil from ' .. player.Name .. '\'s ' .. weapon.Name
  1064. end
  1065.  
  1066. function Commands.setspread(caller, weapon, amount)
  1067.     amount = tonumber(amount)
  1068.     if not AppendChecks({RootCheck = true, ValueCheck = true, amount}) then
  1069.         return 'Invalid caller'
  1070.     end
  1071.  
  1072.     weapon = FindWeapon(Arsenic.Client, weapon)
  1073.  
  1074.     Weapons.SetSpread(weapon, amount)
  1075.     return 'Set the bullet spread of client\'s ' .. weapon.Name .. ' to ' .. amount
  1076. end
  1077.  
  1078. function Commands.nospread(caller, weapon)
  1079.     if not AppendChecks({RootCheck = true}) then
  1080.         return 'Invalid caller'
  1081.     end
  1082.  
  1083.     weapon = FindWeapon(Arsenic.Client, weapon)
  1084.  
  1085.     Weapons.SetSpread(weapon, 0)
  1086.     return 'Removed bullet spread from client\'s ' .. weapon.Name
  1087. end
  1088.  
  1089. function Commands.firerate(caller, weapon, amount)
  1090.     amount = tonumber(amount)
  1091.     if not AppendChecks({RootCheck = true, ValueCheck = true, amount}) then
  1092.         return 'Invalid caller'
  1093.     end
  1094.  
  1095.     weapon = FindWeapon(Arsenic.Client, weapon)
  1096.  
  1097.     Weapons.FireRate(weapon, amount)
  1098.     return 'Set the fire rate of client\'s ' .. weapon.Name .. ' to ' .. amount
  1099. end
  1100.  
  1101. function Commands.infammo(caller, player)
  1102.     player = FindPlayer(player)
  1103.     if type(player) == 'table' then
  1104.         RunList(player, Weapons.SetAmmo, 133742069360)
  1105.         return 'Set all players\' ammo to 133742069360'
  1106.     end
  1107.  
  1108.     Weapons.SetAmmo(player, 133742069360)
  1109.     return 'Set all of ' .. player.Name .. '\'s ammo to 133742069360'
  1110. end
  1111.  
  1112. function Commands.refillammo(caller, player)
  1113.     player = FindPlayer(player)
  1114.     if type(player) == 'table' then
  1115.         RunList(player, Weapons.RefillAmmo)
  1116.         return 'Refilled all players\' ammo'
  1117.     end
  1118.  
  1119.     Weapons.RefillAmmo(player)
  1120.     return 'Refilled all of ' .. player.Name .. '\'s ammo'
  1121. end
  1122.  
  1123. -- Structures
  1124.  
  1125. function Commands.encage(caller, player)
  1126.     if not AppendChecks({AllCheck = true, player}) then
  1127.         return 'Invalid arguments'
  1128.     end
  1129.  
  1130.     player = FindPlayer(player)
  1131.     Structures.Truss(player, 1, 0.125, 1, 10)
  1132.     return 'Put' .. player.Name .. ' in a cage'
  1133. end
  1134.  
  1135. function Commands.uncage(caller, player)
  1136.     if not AppendChecks({AllCheck = true, player}) then
  1137.         return 'Invalid arguments'
  1138.     end
  1139.  
  1140.     player = FindPlayer(player)
  1141.     Structures.Truss(player, 1, 0.125, 1, 30)
  1142.     return 'Opened cage on ' .. player.Name
  1143. end
  1144.  
  1145. function Commands.helix(caller, player)
  1146.     if not AppendChecks({AllCheck = true, player}) then
  1147.         return 'Invalid arguments'
  1148.     end
  1149.  
  1150.     player = FindPlayer(player)
  1151.     Structures.Truss(player, math.rad(10), 0.125, math.rad(10), 30)
  1152.     return 'Created helix on ' .. player.Name
  1153. end
  1154.  
  1155. function Commands.truss(caller, player, x, y, z, d)
  1156.     if not AppendChecks({AllCheck = true, player}) then
  1157.         return 'Invalid arguments'
  1158.     end
  1159.  
  1160.     if not tonumber(x) or not tonumber(y) or not tonumber(z) or not tonumber(d) then
  1161.         return 'Invalid parameter value'
  1162.     end
  1163.  
  1164.     player = FindPlayer(player)
  1165.     Structures.Truss(player, tonumber(x), tonumber(y), tonumber(z), tonumber(d))
  1166.     return 'Created custom truss structure on ' .. player.Name
  1167. end
  1168.  
  1169. -- Cloning
  1170.  
  1171. function Commands.city(caller, player, city)
  1172.     if not AppendChecks({AllCheck = true, city}) then
  1173.         return 'Invalid arguments'
  1174.     end
  1175.  
  1176.     city = FindCity(city)
  1177.     player = FindPlayer(player)
  1178.  
  1179.     if type(player) == 'table' then
  1180.         RunList(player, Cloning.Clone, city)
  1181.         return 'Cloned ' .. city.Name .. ' to players'
  1182.     end
  1183.  
  1184.     Cloning.Clone(player, city)
  1185.     return 'Cloned ' .. city.Name .. ' to ' .. player.Name
  1186. end
  1187.  
  1188. function Commands.wipeclones(caller)
  1189.     for i,v in next, workspace:GetChildren() do
  1190.         if v:IsA('Model') and FindCity(v.Name) then
  1191.             Arsenic('ChangeParent', v, nil)
  1192.         end
  1193.     end
  1194.     return 'Removed all cloned structures'
  1195. end
  1196.  
  1197. return Commands
Advertisement
Add Comment
Please, Sign In to add comment