Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Functions = Arsenic.Functions
- local Environment = Arsenic.Environment
- local Graphics = Arsenic.Graphics
- local Local = Functions.Local
- local Players = Functions.Players
- local Server = Functions.Server
- local Vehicles = Functions.Vehicles
- local Particles = Functions.Particles
- local Banishment = Functions.Banishment
- local Weapons = Functions.Weapons
- local Structures = Functions.Structures
- local Cloning = Functions.Cloning
- local Tabs = Graphics.Interface.Drag.Body.Tabs
- local Commands = {}
- local function RunList(list, func, ...)
- local Vargs = {...}
- for i,v in next, list do
- spawn(function()
- func(v, unpack(Vargs))
- end)
- end
- end
- local function RunListAsync(list, func, ...)
- local Vargs = {...}
- for i,v in next, list do
- func(v, unpack(Vargs))
- end
- end
- local function FindPlayer(player)
- local Caller = Environment.GetLocals(2).caller
- local PlayerOptions = {
- me = Caller,
- others = (function()
- local Return = {}
- for i,v in next, game:GetService('Players'):GetPlayers() do
- if v ~= Caller then
- table.insert(Return, v)
- end
- end
- return Return
- end)(),
- all = game:GetService('Players'):GetPlayers()
- }
- local Option = rawget(PlayerOptions, player)
- if Option then
- return Option
- end
- return Arsenic.Find(game:GetService('Players'):GetPlayers(), player)
- end
- local function FindMaterial(material)
- local Materials = {
- "Plastic",
- "Wood",
- "Slate",
- "Concrete",
- "CorrodedMetal",
- "DiamondPlate",
- "Foil",
- "Grass",
- "Ice",
- "Marble",
- "Granite",
- "Brick",
- "Pebble",
- "Sand",
- "Fabric",
- "SmoothPlastic",
- "Metal",
- "WoodPlanks",
- "Cobblestone",
- "Neon",
- "Glass"}
- for i,v in next, Materials do
- if v:sub(1, material:len()):lower() == material:lower() then
- return v
- end
- end
- end
- local function FindItem(item)
- if item:lower() == 'all' then
- return game:GetService('Lighting').LootDrops:GetChildren()
- end
- if item:lower() == 'm14' then
- if Arsenic.Environment.Place ~= 'Mods' then
- return 'M14'
- end
- return game:GetService('Lighting').LootDrops.M14
- end
- if Arsenic.Environment.Place ~= 'Mods' then
- return Arsenic.Find(game:GetService('Lighting').LootDrops:GetChildren(), item)
- else
- return Arsenic.FindRaw(game:GetService('Lighting').LootDrops:GetChildren(), item)
- end
- end
- local function FindVehicle(vehicle)
- if vehicle:lower() == 'all' then
- return workspace.Vehicles:GetChildren()
- end
- return Arsenic.Find(workspace.Vehicles:GetChildren(), vehicle)
- end
- local function FindWeapon(player, weapon)
- for i,v in next, player.Backpack:GetChildren() do
- if v:FindFirstChild('Shooter') and v.Name:sub(1, weapon:len()):lower() == weapon:lower() then
- return v
- end
- end
- end
- local function FindCity(city)
- return Arsenic.Find(workspace['Anchored Objects']['Towns/Cities']:GetChildren(), city)
- end
- local function FindLocation(location)
- return Arsenic.Find(workspace.Locations:GetChildren(), location)
- end
- local function FindDeletedVehicle(vehicle)
- local vehicles = {}
- for i,v in next, game:GetService('ReplicatedStorage'):GetChildren() do
- if v:FindFirstChild('Seats') then
- table.insert(vehicles, v)
- end
- end
- if item:lower() == 'all' then
- return vehicles
- end
- return Arsenic.Find(vehicles, vehicle)
- end
- local function AppendChecks(checks)
- local function GetRank(player)
- local Ranks = {
- Normie = 1,
- Mod = 2,
- Admin = 3,
- Root = 4
- }
- return rawget(Ranks, Arsenic.GetRank(player))
- end
- local Caller = Environment.GetLocals(2).caller
- local Player = Environment.GetLocals(2).player
- if (checks.HierarchyCheck and (GetRank(Caller) < GetRank(Player)))
- or (checks.RootCheck and (Caller ~= Arsenic.Client))
- or (checks.AllCheck and (rawget(checks, 1) == 'all' or rawget(checks, 1) == 'others'))
- or (checks.ValueCheck and not rawget(checks, 1)) then
- return
- end
- return true
- end
- local function TickCheck(check, value)
- if not value then
- check.Label.Font = 'SourceSansSemibold'
- check.Text = ''
- return
- end
- check.Label.Font = 'SourceSansBold'
- check.Text = '✓'
- end
- -- Commands
- -- Local
- function Commands.cmds(caller)
- if not AppendChecks({RootCheck = true}) then
- return 'Invalid caller'
- end
- Graphics.Interface.DragC.Visible = true
- end
- function Commands.setprefix(caller, new)
- if not AppendChecks({RootCheck = true}) then
- return 'Invalid caller'
- end
- if new:len() ~= 1 then
- return 'Prefix must be, exactly, ONE character'
- end
- Arsenic.Variables.Prefix = new
- return 'Set chat prefix to ' .. new
- end
- function Commands.ws(caller, value)
- value = tonumber(value)
- if not AppendChecks({RootCheck = true, ValueCheck = true, value}) then
- return 'Invalid caller/arguments'
- end
- Local.SetWalkSpeed(value)
- return 'Set client speed to ' .. value
- end
- function Commands.jp(caller, value)
- value = tonumber(value)
- if not AppendChecks({RootCheck = true, ValueCheck = true, value}) then
- return 'Invalid caller/arguments'
- end
- Local.SetJumpPower(value)
- return 'Set client jump power to ' .. value
- end
- function Commands.unlockcam(caller)
- if not AppendChecks({RootCheck = true}) then
- return 'Invalid caller'
- end
- Local.SetZoom(133742069)
- return 'Unlocked client\'s max camera zoom'
- end
- function Commands.nofog(caller)
- if not AppendChecks({RootCheck = true}) then
- return 'Invalid caller'
- end
- Local.SetFog(133742069)
- return 'Removed client\'s fog'
- end
- function Commands.heal(caller)
- if not AppendChecks{RootCheck = true} then
- return 'Invalid caller'
- end
- Arsenic('AddHealth', 100, 0)
- return 'Healed client'
- end
- function Commands.fly(caller)
- if not AppendChecks{RootCheck = true} then
- return 'Invalid caller'
- end
- if Arsenic.Loops.Flying then
- return 'Flight is already enabled'
- end
- TickCheck(Tabs.Local.Toggles.Fly, true)
- spawn(function() Local.Fly(true) end)
- return 'Enabled client flight'
- end
- function Commands.unfly(caller)
- if not AppendChecks{RootCheck = true} then
- return 'Invalid caller'
- end
- if not Arsenic.Loops.Flying then
- return 'Flight is not enabled'
- end
- TickCheck(Tabs.Local.Toggles.Fly, false)
- Local.Fly(false)
- return 'Disabled client flight'
- end
- function Commands.spec(caller, player)
- if not AppendChecks({RootCheck = true, AllCheck = true, player}) then
- return 'Invalid caller/arguments'
- end
- player = FindPlayer(player)
- Local.Spectate(player)
- return 'Spectating ' .. player.Name
- end
- function Commands.glowstick(caller)
- if not AppendChecks({RootCheck = true}) then
- return 'Invalid caller'
- end
- if Arsenic.Loops.Glowstick then
- return 'Glowstick is already enabled'
- end
- TickCheck(Tabs.Local.Toggles.Glowstick, true)
- Local.Glowstick(true)
- return 'Enabled client glowstick effect'
- end
- function Commands.unglowstick(caller)
- if not AppendChecks({RootCheck = true}) then
- return 'Invalid caller'
- end
- if not Arsenic.Loops.Glowstick then
- return 'Glowstick is not enabled'
- end
- TickCheck(Tabs.Local.Toggles.Glowstick, false)
- Local.Glowstick(false)
- return 'Disabled client glowstick effect'
- end
- function Commands.autoheal(caller)
- if not AppendChecks({RootCheck = true}) then
- return 'Invalid caller'
- end
- Local.Autoheal(true)
- return 'Enabled client auto-heal'
- end
- function Commands.noautoheal(caller)
- if not AppendChecks({RootCheck = true}) then
- return 'Invalid caller'
- end
- Local.Autoheal(false)
- return 'Disabled client auto-heal'
- end
- function Commands.admin(caller, player)
- if not AppendChecks({RootCheck = true, AllCheck = true, player}) then
- return 'Invalid caller/arguments'
- end
- player = FindPlayer(player)
- Players.SetAdmin(player, true)
- return 'Gave admin perms to ' .. player.Name
- end
- function Commands.mod(caller, player)
- if not AppendChecks({RootCheck = true, AllCheck = true, player}) then
- return 'Invalid caller/arguments'
- end
- player = FindPlayer(player)
- Players.SetMod(player, true)
- return 'Gave mod perms to ' .. player.Name
- end
- function Commands.unadmin(caller, player)
- if not AppendChecks({RootCheck = true, AllCheck = true, player}) then
- return 'Invalid caller/arguments'
- end
- player = FindPlayer(player)
- Players.SetAdmin(player, false)
- return 'Removed admin perms from' .. player.Name
- end
- function Commands.unmod(caller, player)
- if not AppendChecks({RootCheck = true, AllCheck = true, player}) then
- return 'Invalid caller/arguments'
- end
- player = FindPlayer(player)
- Players.SetMod(player, false)
- return 'Removed mod perms from ' .. player.Name
- end
- -- Players
- function Commands.shirt(caller, player, id)
- id = tonumber(id)
- if not AppendChecks({ValueCheck = true, id}) then
- return 'Invalid ID value'
- end
- player = FindPlayer(player)
- if type(player) == 'table' then
- RunListAsync(player, Players.Shirt, id)
- return 'Changed everybody\'s shirt ID to ' .. id
- end
- Players.Shirt(player, id)
- return 'Changed ' .. player.Name .. '\'s shirt ID to ' .. id
- end
- function Commands.pants(caller, player, id)
- id = tonumber(id)
- if not AppendChecks({ValueCheck = true, id}) then
- return 'Invalid ID value'
- end
- player = FindPlayer(player)
- if type(player) == 'table' then
- RunListAsync(player, Players.Pants, id)
- return 'Changed everybody\'s pants ID to ' .. id
- end
- Players.Pants(player, id)
- return 'Changed ' .. player.Name .. '\'s pants ID to ' .. id
- end
- function Commands.tp(caller, player, player2)
- if not AppendChecks({HierarchyCheck = true, AllCheck = true, player2}) then
- return 'Invalid arguments'
- end
- player = FindPlayer(player)
- player2 = FindPlayer(player2)
- if type(player) == 'table' then
- RunList(player, Players.Teleport, player2)
- return 'Teleported players to ' .. player2.Name
- end
- Players.Teleport(player, player2)
- return 'Teleported ' .. player.Name .. ' to ' .. player2.Name
- end
- function Commands.loc(caller, player, location)
- player = FindPlayer(player)
- location = FindLocation(location)
- if type(player) == 'table' then
- RunList(player, Players.Teleport, location, true)
- return 'Teleported players to ' .. location.Name
- end
- Players.Teleport(player, location, true)
- return 'Teleported ' .. player.Name .. ' to ' .. location.Name
- end
- function Commands.hunger(caller, player, value)
- value = tonumber(value)
- if not AppendChecks({ValueCheck = true, value}) then
- return 'Invalid value'
- end
- player = FindPlayer(player)
- if type(player) == 'table' then
- RunList(Player, Players.SetHunger, value)
- return 'Set all players\'s hunger to ' .. value
- end
- Players.SetHunger(player, value)
- return 'Set ' .. player.Name .. '\'s hunger to ' .. value
- end
- function Commands.thirst(caller, player, value)
- value = tonumber(value)
- if not AppendChecks({ValueCheck = true, value}) then
- return 'Invalid value'
- end
- player = FindPlayer(player)
- if type(player) == 'table' then
- RunList(player, Players.SetThirst, value)
- return 'Set all players\'s thirst to ' .. value
- end
- Players.SetThirst(player, value)
- return 'Set ' .. player.Name .. '\'s thirst to ' .. value
- end
- function Commands.infvitals(caller, player)
- player = FindPlayer(player)
- if type(player) == 'table' then
- RunList(player, Players.SetHunger, 99999)
- return 'Set all players\'s vitals to 99999'
- end
- Players.SetThirst(player, 99999)
- Players.SetHunger(player, 99999)
- return 'Set ' .. player.Name .. '\'s vitals to 99999'
- end
- function Commands.stamina(caller, player, value)
- value = tonumber(value)
- if not AppendChecks({ValueCheck = true, value}) then
- return 'Invalid value'
- end
- player = FindPlayer(player)
- if type(player) == 'table' then
- RunList(Player, Players.SetStamina, value)
- return 'Set all players\'s stamina to ' .. value
- end
- Players.SetStamina(player, value)
- return 'Set ' .. player.Name .. '\'s stamina to ' .. value
- end
- function Commands.clog(caller, player)
- player = FindPlayer(player)
- if type(player) == 'table' then
- RunList(player, Players.CombatLog, true)
- return 'Combat logged players'
- end
- Players.CombatLog(player, true)
- return 'Combat logged ' .. player.Name
- end
- function Commands.days(caller, player, value)
- value = tonumber(value)
- if not AppendChecks({ValueCheck = true, value}) then
- return 'Invalid value'
- end
- player = FindPlayer(player)
- if type(player) == 'table' then
- RunList(player, Players.SetDays, value)
- return 'Set all players\'s days to ' .. value
- end
- Players.SetDays(player, value)
- return 'Set ' .. player.Name .. '\'s days to ' .. value
- end
- function Commands.pkills(caller, player, value)
- value = tonumber(value)
- if not AppendChecks({ValueCheck = true, value}) then
- return 'Invalid value'
- end
- player = FindPlayer(player)
- if type(player) == 'table' then
- RunList(player, Players.SetPlayers, value)
- return 'Set all players\'s player kills to ' .. value
- end
- Players.SetPlayers(player, value)
- return 'Set ' .. player.Name .. '\'s player kills to ' .. value
- end
- function Commands.zkills(caller, player, value)
- value = tonumber(value)
- if not AppendChecks({ValueCheck = true, value}) then
- return 'Invalid value'
- end
- player = FindPlayer(player)
- if type(player) == 'table' then
- RunList(player, Players.SetZombies, value)
- return 'Set all players\'s zombie kills to ' .. value
- end
- Players.SetZombies(player, value)
- return 'Set ' .. player.Name .. '\'s zombie kills to ' .. value
- end
- -- Server
- function Commands.lootmod(caller, value)
- value = tonumber(value)
- if not AppendChecks({ValueCheck = true, value}) then
- return 'Invalid arguments'
- end
- Server.LootRate(value)
- return 'Changed server loot rate to ' .. value
- end
- function Commands.spawn(caller, player, item, amount)
- if not AppendChecks({AllCheck = true, item}) then
- return 'Invalid arguments'
- end
- player = FindPlayer(player)
- item = FindItem(item)
- amount = tonumber(amount)
- if not amount then
- amount = 1
- end
- if type(player) == 'table' then
- RunList(player, Server.Spawn, item, amount)
- return 'Spawned items on players'
- end
- Server.Spawn(player, item, amount)
- return 'Spawned ' .. item.Name .. ' on ' .. player.Name
- end
- function Commands.clearloot(caller)
- Server.ClearLoot()
- return 'Cleared all spawned loot'
- end
- -- Vehicles
- function Commands.vspeed(caller, vehicle, value)
- value = tonumber(value)
- if not AppendChecks({ValueCheck = true, value}) then
- return 'Invalid arguments'
- end
- vehicle = FindVehicle(vehicle)
- if type(vehicle) == 'table' then
- RunList(vehicle, Vehicles.Speed, value)
- return 'Set all vehicles\' speed values to ' .. value
- end
- Vehicles.Speed(vehicle, value)
- return 'Set ' .. vehicle.Name .. '\'s sped value to ' .. value
- end
- function Commands.vgod(caller, vehicle)
- vehicle = FindVehicle(vehicle)
- if type(vehicle) == 'table' then
- RunList(vehicle, Vehicles.God)
- return 'Godded all vehicles'
- end
- Vehicles.God(vehicle)
- return 'Godded ' .. vehicle.Name
- end
- function Commands.vexplode(caller, vehicle)
- vehicle = FindVehicle(vehicle)
- if type(vehicle) == 'table' then
- RunList(vehicle, Vehicles.Explode)
- return 'Exploded all vehicles'
- end
- Vehicles.Explode(vehicle)
- return 'Exploded ' .. vehicle.Name
- end
- function Commands.vtp(caller, player, vehicle)
- if not AppendChecks({AllCheck = true, vehicle}) then
- return 'Invalid arguments'
- end
- vehicle = FindVehicle(vehicle)
- player = FindPlayer(player)
- if type(player) == 'table' then
- RunList(player, Vehicles.Teleport, vehicle)
- return 'Teleported all players to ' .. vehicle.Name
- end
- Vehicles.Teleport(player, vehicle)
- return 'Teleported ' .. player.Name .. ' to ' .. vehicle.Name
- end
- function Commands.vbring(caller, vehicle, player)
- if not AppendChecks({AllCheck = true, player}) then
- return 'Invalid arguments'
- end
- vehicle = FindVehicle(vehicle)
- player = FindPlayer(player)
- if type(vehicle) == 'table' then
- RunList(vehicle, Vehicles.Bring, player)
- return 'Brought all vehicles to ' .. player.Name
- end
- Vehicles.Bring(vehicle, player)
- return 'Brought ' .. vehicle.Name .. ' to ' .. player.Name
- end
- function Commands.vclone(caller, vehicle, player)
- if not AppendChecks({AllCheck = true, vehicle}) then
- return 'Invalid arguments'
- end
- vehicle = FindVehicle(vehicle)
- player = FindPlayer(player)
- if type(player) == 'table' then
- RunListAsync(player, Vehicles.Clone, vehicle)
- return 'Cloned ' .. vehicle.Name ' to players'
- end
- Vehicles.Clone(vehicle , player)
- return 'Cloned ' .. vehicle.Name .. ' to ' .. player.Name
- end
- function Commands.vopacity(caller, vehicle, value)
- value = tonumber(value)
- if not AppendChecks({ValueCheck = true, value}) then
- return 'Invalid parameters'
- end
- vehicle = FindVehicle(vehicle)
- if type(vehicle) == 'table' then
- RunList(vehicle, Vehicles.Opacity, value)
- return 'Changed all vehicles\' opacities to ' .. value
- end
- Vehicles.Opacity(vehicle, value)
- return 'Changed ' .. vehicle.Name .. '\'s opacity to ' .. value
- end
- function Commands.vmat(caller, vehicle, value)
- vehicle = FindVehicle(vehicle)
- value = FindMaterial(value)
- if not value then
- return 'Invalid parameters'
- end
- if type(vehicle) == 'table' then
- RunList(vehicle, Vehicles.Material, value)
- return 'Changed all vehicles\' material to ' .. value
- end
- Vehicles.Material(vehicle, value)
- return 'Changed ' .. vehicle.Name .. '\'s material to ' .. tostring(value)
- end
- function Commands.vbreak(caller, vehicle)
- vehicle = FindVehicle(vehicle)
- if type(vehicle) == 'table' then
- RunList(vehicle, Vehicles.Break)
- return 'Broke all vehicles'
- end
- Vehicles.Break(vehicle)
- return 'Broke ' .. vehicle.Name
- end
- function Commands.vdelete(caller, vehicle)
- vehicle = FindVehicle(vehicle)
- if type(vehicle) == 'table' then
- RunList(vehicle, Vehicles.Remove)
- return 'Deleted all vehicles'
- end
- Vehicles.Remove(vehicle)
- return 'Deleted ' .. vehicle.Name
- end
- function Commands.vadd(caller, vehicle)
- vehicle = FindDeletedVehicle(vehicle)
- if type(vehicle) == 'table' then
- RunList(vehicle, Vehicles.Replenish)
- return 'Replenished all deleted vehicles'
- end
- Vehicles.Replenish(vehicle)
- return 'Replenished ' .. vehicle.Name
- end
- -- Particles
- function Commands.sparkles(caller, player)
- player = FindPlayer(player)
- if type(player) == 'table' then
- RunListAsync(player, Particles.Sparkles)
- return 'Sparkles created in players'
- end
- Particles.Sparkles(player)
- return 'Sparkles create in ' .. player.Name
- end
- function Commands.smoke(caller, player)
- player = FindPlayer(player)
- if type(player) == 'table' then
- RunListAsync(player, Particles.Smoke)
- return 'Smoke created in players'
- end
- Particles.Smoke(player)
- return 'Smoke create in ' .. player.Name
- end
- function Commands.fire(caller, player)
- player = FindPlayer(player)
- if type(player) == 'table' then
- RunListAsync(player, Particles.Fire)
- return 'Fire created in players'
- end
- Particles.Fire(player)
- return 'Fire create in ' .. player.Name
- end
- function Commands.unsparkles(caller, player)
- player = FindPlayer(player)
- if type(player) == 'table' then
- RunList(player, Particles.Remove, 'Sparkles')
- return 'Deleted sparkles in players'
- end
- Particles.Remove(player, 'Sparkles')
- return 'Deleted sparkles in ' .. player.Name
- end
- function Commands.unsmoke(caller, player)
- player = FindPlayer(player)
- if type(player) == 'table' then
- RunList(player, Particles.Remove, 'BuildingSmoke')
- return 'Deleted smoke in players'
- end
- Particles.Remove(player, 'BuildingSmoke')
- return 'Deleted smoke in ' .. player.Name
- end
- function Commands.unfire(caller, player)
- player = FindPlayer(player)
- if type(player) == 'table' then
- RunList(player, Particles.Remove, 'FireEffect')
- return 'Deleted fire in players'
- end
- Particles.Remove(player, 'FireEffect')
- return 'Deleted fire in ' .. player.Name
- end
- -- Physical
- function Commands.face(caller, player)
- player = FindPlayer(player)
- if type(player) == 'table' then
- RunList(player, Players.ShowFace, true)
- return 'Made all players\' faces visible'
- end
- Players.ShowFace(player, true)
- return 'Made ' .. player.Name .. '\'s face visible'
- end
- function Commands.noface(caller, player)
- player = FindPlayer(player)
- if type(player) == 'table' then
- RunList(player, Players.ShowFace, false)
- return 'Made all players\' faces invisible'
- end
- Players.ShowFace(player, false)
- return 'Made ' .. player.Name .. '\'s face invisible'
- end
- function Commands.faceswap(caller, player, player2)
- if (player == 'others' or players == 'all') or player2 == 'others' or player2 == 'all' then
- return 'Invalid parameters'
- end
- player = FindPlayer(player)
- player2 = FindPlayer(player2)
- Arsenic.Functions.Players.FaceSwap(player, player2)
- return 'Faceswapped ' .. player.Name .. ' and ' .. player2.Name
- end
- function Commands.vest(caller, player)
- player = FindPlayer(player)
- if type(player) == 'table' then
- RunList(player, Players.ShowVest, true)
- return 'Made all players\' vests visible'
- end
- Players.ShowVest(player, true)
- return 'Made ' .. player.Name .. '\'s vest visible'
- end
- function Commands.novest(caller, player)
- player = FindPlayer(player)
- if type(player) == 'table' then
- RunList(player, Players.ShowVest, false)
- return 'Made all players\' vests invisible'
- end
- Players.ShowVest(player, false)
- return 'Made ' .. player.Name .. '\'s vest invisible'
- end
- function Commands.opacity(caller, player, value)
- value = tonumber(value)
- if not AppendChecks({ValueCheck = true, value}) then
- return 'Invalid value'
- end
- player = FindPlayer(player)
- if type(player) == 'table' then
- RunList(player, Players.Visibility, value)
- return 'Set players\' character opacity to ' .. value
- end
- Players.Visibility(player, value)
- return 'Set ' .. player.Name .. ' opacity to ' .. value
- end
- -- Banishment
- function Commands.kill(caller, player)
- if not AppendChecks({HierarchyCheck = true}) then
- return 'Invalid caller'
- end
- player = FindPlayer(player)
- if type(player) == 'table' then
- RunListAsync(player, Banishment.Kill)
- return 'Killed players'
- end
- Banishment.Kill(player)
- return 'Killed ' .. player.Name
- end
- function Commands.boom(caller, player)
- if not AppendChecks({HierarchyCheck = true}) then
- return 'Invalid caller'
- end
- player = FindPlayer(player)
- if type(player) == 'table' then
- RunList(player, Banishment.Explode)
- return 'Exploded players'
- end
- Banishment.Explode(player)
- return 'Exploded ' .. player.Name
- end
- function Commands.kick(caller, player)
- player = FindPlayer(player)
- if type(player) == 'table' then
- RunListAsync(player, Banishment.Kick)
- return 'Kicked players'
- end
- Banishment.Kick(player)
- return 'Kicked ' .. player.Name
- end
- function Commands.ban(caller, player)
- player = FindPlayer(player)
- if type(player) == 'table' then
- RunListAsync(player, Banishment.Ban)
- return 'Banned players'
- end
- Banishment.Ban(player)
- return 'Banned ' .. player.Name
- end
- function Commands.unban(caller, player)
- local Bans = Arsenic.Storage.Bans
- if player == 'all' then
- RunListAsync(Bans, Banishment.Unban)
- return 'Cleared bans'
- end
- player = Arsenic.FindRaw(Bans, player)
- Banishment.Unban(player)
- return 'Unbanned ' .. player
- end
- function Commands.punish(caller, player)
- player = FindPlayer(player)
- if type(player) == 'table' then
- RunListAsync(player, Banishment.Punish)
- return 'Punished players'
- end
- Banishment.Punish(player)
- return 'Punished ' .. player.Name
- end
- function Commands.unpunish(caller, player)
- player = FindPlayer(player)
- if type(player) == 'table' then
- RunListAsync(player, Banishment.Unpunish)
- return 'Unpunished players'
- end
- Banishment.Unpunish(player)
- return 'Unpunished ' .. player.Name
- end
- function Commands.crash(caller, player)
- player = FindPlayer(player)
- if type(player) == 'table' then
- RunListAsync(player, Banishment.Crash)
- return 'Crashed players'
- end
- Banishment.Crash(player)
- return 'Crashed ' .. player.Name
- end
- function Commands.trip(caller, player)
- player = FindPlayer(player)
- if type(player) == 'table' then
- RunList(player, Banishment.Trip)
- return 'Tripped players'
- end
- Banishment.Trip(player)
- return 'Tripped ' .. player.Name
- end
- function Commands.nohum(caller, player)
- player = FindPlayer(player)
- if type(player) == 'table' then
- RunList(player, Banishment.SetHumanoid, false)
- return 'Removed players\' humanoids'
- end
- Banishment.SetHumanoid(player, false)
- return 'Removed ' .. player.Name .. '\'s humanoid'
- end
- function Commands.hum(caller, player)
- player = FindPlayer(player)
- if type(player) == 'table' then
- RunListAsync(player, Banishment.SetHumanoid, true)
- return 'Replenished players\' humanoids'
- end
- Banishment.SetHumanoid(player, true)
- return 'Replenished ' .. player.Name .. '\'s humanoid'
- end
- -- Weapons
- function Commands.setrecoil(caller, player, weapon, amount)
- amount = tonumber(amount)
- if not AppendChecks({ValueCheck = true, amount}) or (player == 'all' or player == 'others') then
- return 'Invalid parameters'
- end
- player = FindPlayer(player)
- weapon = FindWeapon(player, weapon)
- if not amount or amount <= 0 then
- amount = 1
- end
- Weapons.SetRecoil(player, weapon, amount)
- return 'Changed ' .. player.Name .. '\'s ' .. weapon.Name .. ' to '
- end
- function Commands.norecoil(caller, player, weapon)
- if not AppendChecks({AllCheck = true, player}) then
- return 'Invalid parameters'
- end
- player = FindPlayer(player)
- weapon = FindWeapon(player, weapon)
- Weapons.SetRecoil(player, weapon, 1)
- return 'Reduced recoil from ' .. player.Name .. '\'s ' .. weapon.Name
- end
- function Commands.setspread(caller, weapon, amount)
- amount = tonumber(amount)
- if not AppendChecks({RootCheck = true, ValueCheck = true, amount}) then
- return 'Invalid caller'
- end
- weapon = FindWeapon(Arsenic.Client, weapon)
- Weapons.SetSpread(weapon, amount)
- return 'Set the bullet spread of client\'s ' .. weapon.Name .. ' to ' .. amount
- end
- function Commands.nospread(caller, weapon)
- if not AppendChecks({RootCheck = true}) then
- return 'Invalid caller'
- end
- weapon = FindWeapon(Arsenic.Client, weapon)
- Weapons.SetSpread(weapon, 0)
- return 'Removed bullet spread from client\'s ' .. weapon.Name
- end
- function Commands.firerate(caller, weapon, amount)
- amount = tonumber(amount)
- if not AppendChecks({RootCheck = true, ValueCheck = true, amount}) then
- return 'Invalid caller'
- end
- weapon = FindWeapon(Arsenic.Client, weapon)
- Weapons.FireRate(weapon, amount)
- return 'Set the fire rate of client\'s ' .. weapon.Name .. ' to ' .. amount
- end
- function Commands.infammo(caller, player)
- player = FindPlayer(player)
- if type(player) == 'table' then
- RunList(player, Weapons.SetAmmo, 133742069360)
- return 'Set all players\' ammo to 133742069360'
- end
- Weapons.SetAmmo(player, 133742069360)
- return 'Set all of ' .. player.Name .. '\'s ammo to 133742069360'
- end
- function Commands.refillammo(caller, player)
- player = FindPlayer(player)
- if type(player) == 'table' then
- RunList(player, Weapons.RefillAmmo)
- return 'Refilled all players\' ammo'
- end
- Weapons.RefillAmmo(player)
- return 'Refilled all of ' .. player.Name .. '\'s ammo'
- end
- -- Structures
- function Commands.encage(caller, player)
- if not AppendChecks({AllCheck = true, player}) then
- return 'Invalid arguments'
- end
- player = FindPlayer(player)
- Structures.Truss(player, 1, 0.125, 1, 10)
- return 'Put' .. player.Name .. ' in a cage'
- end
- function Commands.uncage(caller, player)
- if not AppendChecks({AllCheck = true, player}) then
- return 'Invalid arguments'
- end
- player = FindPlayer(player)
- Structures.Truss(player, 1, 0.125, 1, 30)
- return 'Opened cage on ' .. player.Name
- end
- function Commands.helix(caller, player)
- if not AppendChecks({AllCheck = true, player}) then
- return 'Invalid arguments'
- end
- player = FindPlayer(player)
- Structures.Truss(player, math.rad(10), 0.125, math.rad(10), 30)
- return 'Created helix on ' .. player.Name
- end
- function Commands.truss(caller, player, x, y, z, d)
- if not AppendChecks({AllCheck = true, player}) then
- return 'Invalid arguments'
- end
- if not tonumber(x) or not tonumber(y) or not tonumber(z) or not tonumber(d) then
- return 'Invalid parameter value'
- end
- player = FindPlayer(player)
- Structures.Truss(player, tonumber(x), tonumber(y), tonumber(z), tonumber(d))
- return 'Created custom truss structure on ' .. player.Name
- end
- -- Cloning
- function Commands.city(caller, player, city)
- if not AppendChecks({AllCheck = true, city}) then
- return 'Invalid arguments'
- end
- city = FindCity(city)
- player = FindPlayer(player)
- if type(player) == 'table' then
- RunList(player, Cloning.Clone, city)
- return 'Cloned ' .. city.Name .. ' to players'
- end
- Cloning.Clone(player, city)
- return 'Cloned ' .. city.Name .. ' to ' .. player.Name
- end
- function Commands.wipeclones(caller)
- for i,v in next, workspace:GetChildren() do
- if v:IsA('Model') and FindCity(v.Name) then
- Arsenic('ChangeParent', v, nil)
- end
- end
- return 'Removed all cloned structures'
- end
- return Commands
Advertisement
Add Comment
Please, Sign In to add comment