Pinkstack/roblox-luau-corpus-text huggingface dataset:
-------------------------------------------------------------------
-----------------------[MEDSYSTEM]---------------------------------
-------------------------------------------------------------------



Evt.Ombro.OnServerEvent:Connect(function(Player,Vitima)
	local Nombre
	for SKP_001, SKP_002 in pairs(game.Players:GetChildren()) do
	if SKP_002:IsA('Player') and SKP_002 ~= Player and SKP_002.Name == Vitima then
		if SKP_002.Team == Player.Team then
			Nombre = Player.Name
		else
			Nombre = "Someone"
		end
		Evt.Ombro:FireClient(SKP_002,Nombre)
		end
	end
end)

Evt.Target.OnServerEvent:Connect(function(Player,Vitima)
	Player.Character.Saude.Variaveis.PlayerSelecionado.Value = Vitima
end)

Evt.Render.OnServerEvent:Connect(function(Player,Status,Vitima)
		if Vitima == "N/A" then
			Player.Character.Saude.Stances.Rendido.Value = Status
		else

			local VitimaTop = game.Players:FindFirstChild(Vitima)
		if VitimaTop.Character.Saude.Stances.Algemado.Value == false then
			VitimaTop.Character.Saude.Stances.Rendido.Value = Status
			VitimaTop.Character.Saude.Variaveis.HitCount.Value = 0
		end
	end
end)

Evt.Drag.OnServerEvent:Connect(function(player)
	local Human = player.Character.Humanoid
	local enabled = Human.Parent.Saude.Variaveis.Doer
	local MLs = Human.Parent.Saude.Variaveis.MLs
	local Caido = Human.Parent.Saude.Stances.Caido
	local Item = Human.Parent.Saude.Kit.Epinefrina


	local target = Human.Parent.Saude.Variaveis.PlayerSelecionado
	
	if Caido.Value == false and target.Value ~= "N/A" then

		local player2 = game.Players:FindFirstChild(target.Value)
		local PlHuman = player2.Character.Humanoid

		local Sangrando = PlHuman.Parent.Saude.Stances.Sangrando
		local MLs = PlHuman.Parent.Saude.Variaveis.MLs
		local Dor = PlHuman.Parent.Saude.Variaveis.Dor
		local Ferido = PlHuman.Parent.Saude.Stances.Ferido
		local PlCaido = PlHuman.Parent.Saude.Stances.Caido
		local Sang = PlHuman.Parent.Saude.Variaveis.Sangue
		
		if enabled.Value == false then
	
		if PlCaido.Value == true or PlCaido.Parent.Algemado.Value == true then 
		enabled.Value = true	
		
		coroutine.wrap(function()
        while target.Value ~= "N/A" and PlCaido.Value == true and PlHuman.Health > 0 and Human.Health > 0 and Human.Parent.Saude.Stances.Caido.Value == false or target.Value ~= "N/A" and PlCaido.Parent.Algemado.Value == true do wait() pcall(function()
                player2.Character.Torso.Anchored ,player2.Character.Torso.CFrame = true,Human.Parent.Torso.CFrame*CFrame.new(0,0.75,1.5)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(90))
				enabled.Value = true
        end) end
        pcall(function() player2.Character.Torso.Anchored=false
		enabled.Value = false
		end)
		end)()
		
		enabled.Value = false
		end	
		end	
	end
end)

Evt.Squad.OnServerEvent:Connect(function(Player,SquadName,SquadColor)
	Player.Character.Saude.FireTeam.SquadName.Value = SquadName
	Player.Character.Saude.FireTeam.SquadColor.Value = SquadColor
end)

Evt.Afogar.OnServerEvent:Connect(function(Player)
	Player.Character.Humanoid.Health = 0
end)
--Button size


local ButtonSX = Button.Size.X.Scale
local ButtonSY = Button.Size.Y.Scale

Button.MouseEnter:Connect(function(x,y)
	--HolaMousee
	Button:TweenSize(
		UDim2.new(ButtonSX + 0.021 , 0,ButtonSY + 0.018, 0),
		Enum.EasingDirection.Out,
		Enum.EasingStyle.Back,
		0.2,
		true
	)
end)

Button.MouseLeave:Connect(function(x,y)
	--AdiosMousee
	Button:TweenSize(
		UDim2.new(ButtonSX, 0,ButtonSY, 0),
		Enum.EasingDirection.Out,
		Enum.EasingStyle.Back,
		0.2,
		true
	)
end)

Button.MouseButton1Down:Connect(function(x,y)
	--Holding mouse
	Button:TweenSize(
		UDim2.new(ButtonSX - 0.021 , 0,ButtonSY - 0.018 , 0),
		Enum.EasingDirection.Out,
		Enum.EasingStyle.Back,
		0.15,
		true
	)
end)

Button.MouseButton1Up:Connect(function(x,y)
	--Holding mouse
	Button:TweenSize(
		UDim2.new(ButtonSX + 0.021,0, ButtonSY + 0.018,0),
		Enum.EasingDirection.Out,
		Enum.EasingStyle.Back,
		0.15,
		true
	)
end)
-- 28-36


module.Subcategory.Bundles = 37
module.Subcategory.AnimationBundles = 38
module.Subcategory.EmoteAnimations = 39
module.Subcategory.CommunityCreations = 40
module.Subcategory.Melee = 41
module.Subcategory.Ranged = 42
module.Subcategory.Explosive = 43
module.Subcategory.PowerUp = 44
module.Subcategory.Navigation = 45
module.Subcategory.Musical = 46
module.Subcategory.Social = 47
module.Subcategory.Building = 48
module.Subcategory.Transport = 49


module.AssetType = {}
module.AssetType.None = 0

module.AssetType["T-Shirt"] = 2
module.AssetType.Hat = 8
module.AssetType.Shirt = 11
module.AssetType.Pants = 12
module.AssetType.Head = 17
module.AssetType.Face = 18
module.AssetType.Gear = 19
module.AssetType.Arms = 25
module.AssetType.Legs = 26
module.AssetType.Torso = 27
module.AssetType.RightArm = 28
module.AssetType.LeftArm = 29
module.AssetType.LeftLeg = 30
module.AssetType.RightLeg = 31
module.AssetType.HairAccessory = 41
module.AssetType.FaceAccessory = 42
module.AssetType.NeckAccessory = 43
module.AssetType.ShoulderAccessory = 44
module.AssetType.FrontAccessory = 45
module.AssetType.BackAccessory = 46
module.AssetType.WaistAccessory = 47
module.AssetType.ClimbAnimation = 48
module.AssetType.DeathAnimation = 49
module.AssetType.FallAnimation = 50
module.AssetType.IdleAnimation = 51
module.AssetType.JumpAnimation = 52
module.AssetType.RunAnimation = 53
module.AssetType.SwimAnimation = 54
module.AssetType.WalkAnimation = 55
module.AssetType.PoseAnimation = 56
module.AssetType.EmoteAnimation = 61


function module.GetOptionName(section, value)
	for k, v in pairs(module[section]) do
		if v == value then
			return k
		end
	end
end


return module
--[[Transmission]]


	Tune.TransModes		= {"Auto","Semi"}												--[[
	[Modes]
		"Auto"		: Automatic shifting
		"Semi"		: Clutchless manual shifting, dual clutch transmission
		"Manual"	: Manual shifting with clutch
		
		>Include within brackets
			eg: {"Semi"} or {"Auto", "Manual"}								
		>First mode is default mode													]]
	
	--Automatic Settings
	Tune.AutoShiftMode	= "Speed"												--[[
	[Modes]
		"Speed"		: Shifts based on wheel speed
		"RPM"		: Shifts based on RPM											]]	
	Tune.AutoUpThresh	= -200		-- Automatic upshift point 	(relative to peak RPM, positive = Over-rev)
	Tune.AutoDownThresh = 1400		-- Automatic downshift point (relative to peak RPM, positive = Under-rev)
	Tune.ShiftTime = .3				-- The time delay in which you initiate a shift and the car changes gear
	
	--Gear Ratios
	
	Tune.FinalDrive		= 4.5			-- Gearing determines top speed and wheel torque
	Tune.Ratios			= {				-- Higher ratio = more torque, Lower ratio = higher top speed
		--[[Reverse]]	3.70		,	-- Copy and paste a ratio to add a gear
		--[[Neutral]]	0			,	-- Ratios can also be deleted
		--[[ 1 ]]		3.53		,	-- Reverse, Neutral, and 1st gear are required
		--[[ 2 ]]		2.04		,
		--[[ 3 ]]		1.38		,
		--[[ 4 ]]		1.03		,
		--[[ 5 ]]		0.81		,
		--[[ 6 ]]		0.64		,
	}
	Tune.FDMult			= 1.5			-- Ratio multiplier (keep this at 1 if car is not struggling with torque)
------------------------------------------------------------------------
-- decodes a 4-char little-endian string into an instruction struct
------------------------------------------------------------------------


function luaP:DecodeInst(x)
  local byte = string.byte
  local i = {}
  local I = byte(x, 1)
  local op = I % 64
  i.OP = op
  I = byte(x, 2) * 4 + (I - op) / 64  -- 2 bits of c0 left
  local a = I % 256
  i.A = a
  I = byte(x, 3) * 4 + (I - a) / 256  -- 2 bits of c1 left
  local c = I % 512
  i.C = c
  i.B = byte(x, 4) * 2 + (I - c) / 512 -- 1 bits of c2 left
  local opmode = self.OpMode[tonumber(string.sub(self.opmodes[op + 1], 7, 7))]
  if opmode ~= "iABC" then
    i.Bx = i.B * 512 + i.C
  end
  return i
end
-- ROBLOX deviation: omitting prettyFormat import



local function serialize(val: string): string
	-- Return the string itself, not escaped nor enclosed in double quote marks.
	local ansiLookupTable = {
		[chalk.inverse.open] = "<i>",
		[chalk.inverse.close] = "</i>",
		[chalk.bold.open] = "<b>",
		[chalk.dim.open] = "<d>",
		[chalk.green.open] = "<g>",
		[chalk.red.open] = "<r>",
		[chalk.yellow.open] = "<y>",
		[chalk.bgYellow.open] = "<Y>",
		[chalk.bold.close] = "</>",
		[chalk.dim.close] = "</>",
		[chalk.green.close] = "</>",
		[chalk.red.close] = "</>",
		[chalk.yellow.close] = "</>",
		[chalk.bgYellow.close] = "</>",
	}

	return val:gsub(ansiRegex, function(match)
		if ansiLookupTable[match] then
			return ansiLookupTable[match]
		else
			return match
		end
	end)
end

local function test(val: any)
	return typeof(val) == "string"
end

return {
	serialize = serialize,
	test = test,
}
---------------------------------------Function end here.


end


Tool.Enabled = true
function onActivated()

	if not Tool.Enabled then
		return
	end

	--Tool.Enabled = false

	local character = Tool.Parent;
	local humanoid = character.Humanoid
	if humanoid == nil then
		print("Humanoid not found")
		return 
	end

	local targetPos = humanoid.TargetPoint
	local lookAt = (targetPos - character.Head.Position).unit
	
	if (check()) then
	fire(lookAt)
	wait(0.0003)
	onActivated()
	end
	return

	--Tool.Enabled = true
end


script.Parent.Activated:connect(onActivated)
--[=[
	Observables are like an [signal](/api/Signal), except they do not execute code
	until the observable is subscribed to. This follows the standard
	Rx API surface for an observable.

	Observables use a [Subscription](/api/Subscription) to emit values.

	```lua
	-- Constucts an observable which will emit a, b, c via a subscription
	local observable = Observable.new(function(sub)
		print("Connected")
		sub:Fire("a")
		sub:Fire("b")
		sub:Fire("c")
		sub:Complete() -- ends stream
	end)

	local sub1 = observable:Subscribe() --> Connected
	local sub2 = observable:Subscribe() --> Connected
	local sub3 = observable:Subscribe() --> Connected

	sub1:Destroy()
	sub2:Destroy()
	sub3:Destroy()
	```

	Note that emitted values may be observed like this

	```lua
	observable:Subscribe(function(value)
		print("Got ", value)
	end)

	--> Got a
	--> Got b
	--> Got c
	```

	Note that also, observables return a [MaidTask](/api/MaidTask) which
	should be used to clean up the resulting subscription.

	```lua
	maid:GiveTask(observable:Subscribe(function(value)
		-- do work here!
	end))
	```

	Observables over signals are nice because observables may be chained and manipulated
	via the Pipe operation.

	:::tip
	You should always clean up the subscription using a [Maid](/api/Maid), otherwise
	you may memory leak.
	:::
	@class Observable
]=]



local require = require(script.Parent.loader).load(script)

local Subscription = require("Subscription")

local ENABLE_STACK_TRACING = false

local Observable = {}
Observable.ClassName = "Observable"
Observable.__index = Observable
--local doubleJumpMod = require(extraMods.DoubleJump)


local chestDisplayMod = require(extraMods.Chest.ChestDisplay)
local safeZoneMod = require(UIMods.SafeZone.SafeZoneMod)
local petMoveClient = require(modules.Pet.PetClientMovement)
local petClientMod = require(modules.Pet.PetClient)
local classBoostDisplay = require(UIMods.WeaponShop.ClassBoostDisplay)
local skillShopMod = require(UIMods.SkillsShop.SkillsShopHandler)
local settingsMod = require(UIMods.Settings.SettingsHandler)
local islandsMod = require(modules.Zones.ZoneUpdate)
local bossRewardsDisplayMod = require(extraMods.BossRewardDisplay)
local sellClientMod = require(UIMods.Sell.SellClient)
local statsUIMod = require(UIMods.Stats.StatsUIMod)
local indexUIMod = require(UIMods.Index.IndexUIMod)
local hoopClient = require(extraMods.HoopClient)
local dmgTextMod = require(extraMods.DamageText)
local colorChangeMod = require(extraMods.ColorChange)
local boostClientMod = require(UIMods.Boosts.BoostClient)
local shirtBuyMod = require(extraMods.Shirts.ShirtBuying)
local gemBoostMod = require(UIMods.Boosts.GemBoosts)
local mainUIMod = require(UIMods.UIMain)

petClientMod:Int(plr)
mainUIMod:Int()
deviceMod:Int(plr)
chestDisplayMod:Int()
boostClientMod:Int(plr)
displayStatsMod:Int(plr)
rotateObectsMod:Int()
showStatsMod:Int()
codeUIMod:Int()
weaponShop:Int(plr)
eggClientMod:Int(plr)
safeZoneMod:Int(plr)
settingsMod:Int(plr)
skillShopMod:Int(plr)
petMoveClient:Int(plr)
shirtBuyMod:Int(plr)
classBoostDisplay:Int(plr)
bossRewardsDisplayMod:Int(plr)
sellClientMod:Int(plr)
indexUIMod:Int(plr)
hoopClient:Int(plr)
dmgTextMod:Int()
rShopMod:Int(plr)
colorChangeMod:Int()
gemBoostMod:Int(plr)
islandsMod:Int(plr)
statsUIMod:Int(plr)
--[[
	Notes:	
	Transparency Modifier is what is the end result when "zooming in", it can be changed to whatever you like.
	
	Camera Offset is changed to allow the player to see at lower angles without clipping the view with the torso.
	This may or maynot effect certian tools if they change the players camera position IE crouching or crawling.
	
	Use:
	Place into StarterPlayer.StarterChacterScripts
--]]



local character = (game.Players.LocalPlayer.Character or game.Players.LocalPlayer.CharacterAdded:wait())

game:GetService("RunService").RenderStepped:connect(function()
	if (character:FindFirstChild("RightUpperArm") and character:FindFirstChild("LeftUpperArm")) then

		character:FindFirstChild("RightUpperArm").LocalTransparencyModifier = 0

		character:FindFirstChild("LeftUpperArm").LocalTransparencyModifier = 0
		
		character:FindFirstChild("RightLowerArm").LocalTransparencyModifier = 0

		character:FindFirstChild("LeftLowerArm").LocalTransparencyModifier = 0
				
		character:FindFirstChild("RightHand").LocalTransparencyModifier = 0

		character:FindFirstChild("LeftHand").LocalTransparencyModifier = 0
		
		character:FindFirstChild("RightUpperLeg").LocalTransparencyModifier = 0

		character:FindFirstChild("LeftUpperLeg").LocalTransparencyModifier = 0
		
		character:FindFirstChild("RightLowerLeg").LocalTransparencyModifier = 0

		character:FindFirstChild("LeftLowerLeg").LocalTransparencyModifier = 0
				
		character:FindFirstChild("RightFoot").LocalTransparencyModifier = 0

		character:FindFirstChild("LeftFoot").LocalTransparencyModifier = 0
			
		--character:FindFirstChild("Humanoid").CameraOffset = Vector3.new(0,0,-1)
	end
end)
--local Torso = Figure:WaitForChild("Torso")
--local RightShoulder = Torso:WaitForChild("Right Shoulder")
--local LeftShoulder = Torso:WaitForChild("Left Shoulder")
--local RightHip = Torso:WaitForChild("Right Hip")
--local LeftHip = Torso:WaitForChild("Left Hip")
--local Neck = Torso:WaitForChild("Neck")


local Humanoid = Figure:WaitForChild("Humanoid")
local pose = "Standing"

local EMOTE_TRANSITION_TIME = 0.1

local userAnimateScaleRunSuccess, userAnimateScaleRunValue = pcall(function() return UserSettings():IsUserFeatureEnabled("UserAnimateScaleRun") end)
local userAnimateScaleRun = userAnimateScaleRunSuccess and userAnimateScaleRunValue

local function getRigScale()
	if userAnimateScaleRun then
		return Figure:GetScale()
	else
		return 1
	end
end

local currentAnim = ""
local currentAnimInstance = nil
local currentAnimTrack = nil
local currentAnimKeyframeHandler = nil
local currentAnimSpeed = 1.0
local animTable = {}
local animNames = { 
	idle = 	{	
				{ id = "http://www.roblox.com/asset/?id=180435571", weight = 9 },
				{ id = "http://www.roblox.com/asset/?id=180435792", weight = 1 }
			},
	walk = 	{ 	
				{ id = "http://www.roblox.com/asset/?id=180426354", weight = 10 } 
			}, 
	run = 	{
				{ id = "run.xml", weight = 10 } 
			}, 
	jump = 	{
				{ id = "http://www.roblox.com/asset/?id=125750702", weight = 10 } 
			}, 
	fall = 	{
				{ id = "http://www.roblox.com/asset/?id=180436148", weight = 10 } 
			}, 
	climb = {
				{ id = "http://www.roblox.com/asset/?id=180436334", weight = 10 } 
			}, 
	sit = 	{
				{ id = "http://www.roblox.com/asset/?id=178130996", weight = 10 } 
			},	
	toolnone = {
				{ id = "http://www.roblox.com/asset/?id=182393478", weight = 10 } 
			},
	toolslash = {
				{ id = "http://www.roblox.com/asset/?id=129967390", weight = 10 }
--[[**
		wraps a callback in an assert with checkArgs

		@param callback The function to wrap
		@param checkArgs The functon to use to check arguments in the assert

		@returns A function that first asserts using checkArgs and then calls callback
	**--]]


	function t.wrap(callback, checkArgs)
		assert(checkWrap(callback, checkArgs))
		return function(...)
			assert(checkArgs(...))
			return callback(...)
		end
	end
end
-- ================================================================================
-- SETTINGS
-- ================================================================================


GameSettings.intermissionDuration = 10		-- Duration of intermission in seconds
GameSettings.roundDuration = 60			-- Durationof race in seconds
GameSettings.countdownDuration = 3			-- Race countdown at starting line in seconds
GameSettings.minimumPlayers = 1			-- Minimum number of players for a race to start
GameSettings.transitionEnd = 3				-- Duration of time between end of race and beginning of
											-- next intermission
--[=[
	@param andThenFn (value: any) -> Option
	@return value: Option
	If the option holds a value, then the `andThenFn`
	function is called with the held value of the option,
	and then the resultant Option returned by the `andThenFn`
	is returned. Otherwise, None is returned.

	```lua
	local optA = Option.Some(32)
	local optB = optA:AndThen(function(num)
		return Option.Some(num * 2)
	end)
	print(optB:Expect("Expected number")) --> 64
	```
]=]


function Option:AndThen(andThenFn)
	if self:IsSome() then
		local result = andThenFn(self:Unwrap())
		Option.Assert(result)
		return result
	else
		return Option.None
	end
end
--[=[
	Returns a unique render name for every call, which can
	be used with the `BindToRenderStep` method optionally.

	```lua
	shake:BindToRenderStep(Shake.NextRenderName(), ...)
	```
]=]


function Shake.NextRenderName(): string
	renderId += 1
	return ("__shake_%.4i__"):format(renderId)
end
-- Adjust the movement of the firefly, allowing them to roam around.



local Fly = script.Parent

while true do -- Alter the flies movement direction every once a while to make it roam around
	Fly.BodyVelocity.velocity = Vector3.new(math.random(-100,100)*0.5,math.random(-100,100)*0.1,math.random(-100,100)*0.5)
	wait(math.random(10,25)*0.1)
end
--This module is for any client FX related to the Lab's door



local WoodenBarrierFX = {}

local tweenService = game:GetService("TweenService")

local tweenInfo = TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut)

function WoodenBarrierFX.BREAK(plank)
	if not plank then return end
	
	plank.Transparency = 1
	local plankClone = plank:Clone()
	plankClone.Transparency = 0
	plankClone.CanCollide = false
	plankClone.CanTouch = false
	plankClone.Massless = true
	plankClone.Anchored = true
	
	local smoke = script.Smoke:Clone()
	smoke.Parent = plankClone
	
	plankClone.Parent = workspace.Ignore
	tweenService:Create(plankClone, TweenInfo.new(2, Enum.EasingStyle.Sine, Enum.EasingDirection.In), {Transparency = 1}):Play()
	game.Debris:AddItem(plankClone, 2)
	
	plankClone.CFrame = plank.CFrame

	local velo = plank.CFrame.UpVector * (-25 - math.random() * 10)
	plankClone.Anchored = false
	plankClone.Velocity = velo + Vector3.new(0, 25 + math.random() * 10, 0)
	plankClone.RotVelocity = Vector3.new(math.random() * 20 - 10, math.random() * 20 - 10, math.random() * 20 - 10)
	smoke:Emit(60)
	
end

function WoodenBarrierFX.BUILD(plank)
	if not plank then return end
	
	plank.Transparency = 1
	local plankClone = plank:Clone()
	plankClone.Transparency = 1
	plankClone.CanCollide = false
	plankClone.CanTouch = false
	plankClone.Massless = true
	
	local smoke = script.Smoke:Clone()
	smoke.Parent = plankClone
	local sparks = script.Sparks:Clone()
	sparks.Parent = plankClone
	
	plankClone.Parent = workspace.Ignore
	game.Debris:AddItem(plankClone, 3)
	
	local midCf = plank.CFrame * CFrame.new(0, -5, 0)
	local startCf = midCf - Vector3.new(0, 5, 0)
	local endCf = plank.CFrame
	
	plankClone.CFrame = startCf
	tweenService:Create(plankClone, TweenInfo.new(0.4, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {Position = midCf.Position}):Play()
	tweenService:Create(plankClone, TweenInfo.new(0.2), {Transparency = 0}):Play()
	local originOrientation = plankClone.Orientation
	
	local start = tick()
	while tick() - start <= 0.5 do
		plankClone.Orientation = originOrientation + Vector3.new(math.random() * 6 - 3, math.random() * 6 - 3, math.random() * 6 - 3)
		wait()
	end
	
	tweenService:Create(plankClone, TweenInfo.new(0.1, Enum.EasingStyle.Cubic, Enum.EasingDirection.In), {CFrame = endCf}):Play()
	delay(0.1, function()
		smoke:Emit(60)
		sparks:Emit(30)
	end)
	wait(0.5)
	
	plank.Transparency = 0

end

return WoodenBarrierFX
--[[

	Ser is a serialization/deserialization utility module that is used
	by Knit to automatically serialize/deserialize values passing
	through remote functions and remote events.


	Ser.Classes = {
		[ClassName] = {
			Serialize = (value) -> serializedValue
			Deserialize = (value) => deserializedValue
		}
	}

	Ser.SerializeArgs(...)            -> table
	Ser.SerializeArgsAndUnpack(...)   -> Tuple
	Ser.DeserializeArgs(...)          -> table
	Ser.DeserializeArgsAndUnpack(...) -> Tuple
	Ser.Serialize(value: any)         -> any
	Ser.Deserialize(value: any)       -> any
	Ser.UnpackArgs(args: table)       -> Tuple

--]]




type Args = {
	n: number,
	[any]: any,
}


local Option = require(script.Parent.Option)

local Ser = {}

Ser.Classes = {
	Option = {
		Serialize = function(opt) return opt:Serialize() end;
		Deserialize = Option.Deserialize;
	};
}


function Ser.SerializeArgs(...: any): Args
	local args = table.pack(...)
	for i,arg in ipairs(args) do
		if type(arg) == "table" then
			local ser = Ser.Classes[arg.ClassName]
			if ser then
				args[i] = ser.Serialize(arg)
			end
		end
	end
	return args
end


function Ser.SerializeArgsAndUnpack(...: any): ...any
	local args = Ser.SerializeArgs(...)
	return table.unpack(args, 1, args.n)
end


function Ser.DeserializeArgs(...: any): Args
	local args = table.pack(...)
	for i,arg in ipairs(args) do
		if (type(arg) == "table") then
			local ser = Ser.Classes[arg.ClassName]
			if (ser) then
				args[i] = ser.Deserialize(arg)
			end
		end
	end
	return args
end


function Ser.DeserializeArgsAndUnpack(...: any): ...any
	local args = Ser.DeserializeArgs(...)
	return table.unpack(args, 1, args.n)
end


function Ser.Serialize(value: any): any
	if (type(value) == "table") then
		local ser = Ser.Classes[value.ClassName]
		if (ser) then
			value = ser.Serialize(value)
		end
	end
	return value
end


function Ser.Deserialize(value: any): any
	if (type(value) == "table") then
		local ser = Ser.Classes[value.ClassName]
		if (ser) then
			value = ser.Deserialize(value)
		end
	end
	return value
end


function Ser.UnpackArgs(args: Args): ...any
	return table.unpack(args, 1, args.n)
end


return Ser
--!strict
--[=[
	@function push
	@within Array

	@param array {T} -- The array to push an element to.
	@param ... ...T -- The elements to push.
	@return {T} -- The array with the pushed elements.

	Adds elements to the end of the array.

	#### Aliases

	`append`

	```lua
	local array = { 1, 2, 3 }

	local new = Push(array, 4, 5, 6) -- { 1, 2, 3, 4, 5, 6 }
	```
]=]


local function push<T>(array: { T }, ...: T): { T }
	local result = {}

	for index, value in ipairs(array) do
		table.insert(result, value)
	end

	for _, value in ipairs({ ... }) do
		table.insert(result, value)
	end

	return result
end

return push
-- initialize camera shaker object


local camShake = CameraShaker.new(Enum.RenderPriority.Camera.Value, function(shakeCf)
	camera.CFrame = camera.CFrame * shakeCf
end)
camShake:Start()

local CameraShake = {}

function CameraShake.ShakeOnce()
	if not tool:GetAttribute('CameraShake') then return end
	-- CameraShaker:ShakeOnce(magnitude, roughness [, fadeInTime, fadeOutTime, posInfluence, rotInfluence])
	camShake:ShakeOnce(5, 20 , 0, 1.5, Vector3.new(.5,.5,.5), Vector3.new())
end

function CameraShake.ShakeSustain()
	if not tool:GetAttribute('CameraShake') then return end
	camShake:ShakeSustain(CameraShaker.Presets.Earthquake)
end

function CameraShake.StopSustained()
	if not tool:GetAttribute('CameraShake') then return end
	camShake:StopSustained(1)
end

return CameraShake