Pinkstack/roblox-luau-corpus-text huggingface dataset:
-- Checks if the player is new, otherwise will populate with saved data


Players.PlayerAdded:Connect(function(player)
	local data
	local success = pcall(function()
		data = AllPlayers:GetAsync(player.UserId)
	end)

	if success then
		local status = ""

		if not data then
			AllPlayers:SetAsync(player.UserId, true)
		else
			status = Statuses:GetAsync(player.UserId)
		end

		player:SetAttribute("status", status)
	end
end)
--[[
	Issues a warning like `Logging.warn`, but only outputs once per call site.

	This is useful for marking deprecated functions that might be called a lot;
	using `warnOnce` instead of `warn` will reduce output noise while still
	correctly marking all call sites.
]]


function Logging.warnOnce(messageTemplate, ...)
	local trace = debug.traceback()

	if onceUsedLocations[trace] then
		return
	end

	onceUsedLocations[trace] = true
	Logging.warn(messageTemplate, ...)
end

return Logging
--// Bullet Physics


	BulletPhysics = Vector3.new(-10,55,0); -- Drop fixation: Lower number = more drop
	BulletSpeed = 2725; -- Bullet Speed
	BulletSpread = 2.5; -- How much spread the bullet has
	
	ExploPhysics = Vector3.new(0,20,0); -- Drop for explosive rounds
	ExploSpeed = 600; -- Speed for explosive rounds
	
	BulletDecay = 10000; -- How far the bullet travels before slowing down and being deleted (BUGGY)
--// Aim|Zoom|Sensitivity Customization


	ZoomSpeed = 0.25; -- The lower the number the slower and smoother the tween
	AimZoom = 50; -- Default zoom
	AimSpeed = 0.45;
	UnaimSpeed = 0.35;
	CycleAimZoom = 50; -- Cycled zoom
	MouseSensitivity = 0.5; -- Number between 0.1 and 1
	SensitivityIncrement = 0.05; -- No touchy
--[[
		___      _______                _     
	   / _ |____/ ___/ /  ___ ____ ___ (_)__ 
	  / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-<
	 /_/ |_|   \___/_//_/\_,_/___/___/_/___/
 						SecondLogic @ Inspare
]]




local autoscaling	= false					--Estimates top speed

local UNITS	= {								--Click on speed to change units
											--First unit is default	
	{
		units			= "MPH"				,
		scaling			= (10/12) * (60/88)	, -- 1 stud : 10 inches | ft/s to MPH
		maxSpeed		= 230				,
		spInc			= 20				, -- Increment between labelled notches
	},
	
	{
		units			= "KM/H"			,
		scaling			= (10/12) * 1.09728	, -- 1 stud : 10 inches | ft/s to KP/H
		maxSpeed		= 370				,
		spInc			= 40				, -- Increment between labelled notches
	},
	
	{
		units			= "SPS"				,
		scaling			= 1					, -- Roblox standard
		maxSpeed		= 400				,
		spInc			= 40				, -- Increment between labelled notches
	}
}
-- Preload animations


function playAnimation(animName, transitionTime, humanoid) 

    local roll = math.random(1, animTable[animName].totalWeight) 
    local origRoll = roll
    local idx = 1
    while (roll > animTable[animName][idx].weight) do
        roll = roll - animTable[animName][idx].weight
        idx = idx + 1
    end
    --print(animName .. " " .. idx .. " [" .. origRoll .. "]")
    local anim = animTable[animName][idx].anim
    -- switch animation
    if (anim ~= currentAnimInstance) then
        if (currentAnimTrack ~= nil) then
            currentAnimTrack:Stop(transitionTime)
            currentAnimTrack:Destroy()
        end
        currentAnimSpeed = 1.0
        -- load it to the humanoid; get AnimationTrack
        currentAnimTrack = humanoid:LoadAnimation(anim)
        -- play the animation
        currentAnimTrack:Play(transitionTime)
        currentAnim = animName
        currentAnimInstance = anim
        -- set up keyframe name triggers
        if (currentAnimKeyframeHandler ~= nil) then
            currentAnimKeyframeHandler:disconnect()
        end
        currentAnimKeyframeHandler = currentAnimTrack.KeyframeReached:connect(keyFrameReachedFunc)
    end
end
--[[ Constants ]]

--
local ZERO_VECTOR3 = Vector3.new(0,0,0)
local USE_STACKING_TRANSPARENCY = true	-- Multiple items between the subject and camera get transparency values that add up to TARGET_TRANSPARENCY
local TARGET_TRANSPARENCY = 0.75 -- Classic Invisicam's Value, also used by new invisicam for parts hit by head and torso rays
local TARGET_TRANSPARENCY_PERIPHERAL = 0.5 -- Used by new SMART_CIRCLE mode for items not hit by head and torso rays

local MODE = {
	--CUSTOM = 1, 		-- Retired, unused
	LIMBS = 2, 			-- Track limbs
	MOVEMENT = 3, 		-- Track movement
	CORNERS = 4, 		-- Char model corners
	CIRCLE1 = 5, 		-- Circle of casts around character
	CIRCLE2 = 6, 		-- Circle of casts around character, camera relative
	LIMBMOVE = 7, 		-- LIMBS mode + MOVEMENT mode
	SMART_CIRCLE = 8, 	-- More sample points on and around character
	CHAR_OUTLINE = 9,	-- Dynamic outline around the character
}

local LIMB_TRACKING_SET = {
	-- Body parts common to R15 and R6
	['Head'] = true,

	-- Body parts unique to R6
	['Left Arm'] = true,
	['Right Arm'] = true,
	['Left Leg'] = true,
	['Right Leg'] = true,

	-- Body parts unique to R15
	['LeftLowerArm'] = true,
	['RightLowerArm'] = true,
	['LeftUpperLeg'] = true,
	['RightUpperLeg'] = true
}

local CORNER_FACTORS = {
	Vector3.new(1,1,-1),
	Vector3.new(1,-1,-1),
	Vector3.new(-1,-1,-1),
	Vector3.new(-1,1,-1)
}

local CIRCLE_CASTS = 10
local MOVE_CASTS = 3
local SMART_CIRCLE_CASTS = 24
local SMART_CIRCLE_INCREMENT = 2.0 * math.pi / SMART_CIRCLE_CASTS
local CHAR_OUTLINE_CASTS = 24
--// Positioning


	RightArmPos = CFrame.new(-0.902175903, 0.295501232, -1.32277012, 1, 0, 0, 0, 1.19248806e-08, 1, 0, -1, 1.19248806e-08);
	LeftArmPos = CFrame.new(1.06851184, 0.973718464, -2.29667926, 0.787567914, -0.220087856, 0.575584888, -0.615963876, -0.308488727, 0.724860668, 0.0180283934, -0.925416589, -0.378522098);
	GunPos = CFrame.new(0.284460306, -0.318524063, 1.06423128, 1, 0, 0, 0, -2.98023224e-08, -0.99999994, 0, 0.99999994, -2.98023224e-08);
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------




function onRunning(speed)
	if speed>0.01 then
		playAnimation("walk", 0.1, Humanoid)
		pose = "Running"
	else
		playAnimation("idle", 0.1, Humanoid)
		pose = "Standing"
	end
end

function onDied()
	pose = "Dead"
end

function onJumping()
	playAnimation("jump", 0.1, Humanoid)
	jumpAnimTime = jumpAnimDuration
	pose = "Jumping"
end

function onClimbing(speed)
	playAnimation("climb", 0.1, Humanoid)
	setAnimationSpeed(speed / 12.0)
	pose = "Climbing"
end

function onGettingUp()
	pose = "GettingUp"
end

function onFreeFall()
	if (jumpAnimTime <= 0) then
		playAnimation("fall", fallTransitionTime, Humanoid)
	end
	pose = "FreeFall"
end

function onFallingDown()
	pose = "FallingDown"
end

function onSeated()
	pose = "Seated"
end

function onPlatformStanding()
	pose = "PlatformStanding"
end

function onSwimming(speed)
	if speed>0 then
		pose = "Running"
	else
		pose = "Standing"
	end
end

function getTool()	
	for _, kid in ipairs(Figure:GetChildren()) do
		if kid.className == "Tool" then return kid end
	end
	return nil
end

function getToolAnim(tool)
	for _, c in ipairs(tool:GetChildren()) do
		if c.Name == "toolanim" and c.className == "StringValue" then
			return c
		end
	end
	return nil
end

function animateTool()
	
	if (toolAnim == "None") then
		playToolAnimation("toolnone", toolTransitionTime, Humanoid)
		return
	end

	if (toolAnim == "Slash") then
		playToolAnimation("toolslash", 0, Humanoid)
		return
	end

	if (toolAnim == "Lunge") then
		playToolAnimation("toollunge", 0, Humanoid)
		return
	end
end

function moveSit()
	RightShoulder.MaxVelocity = 0.15
	LeftShoulder.MaxVelocity = 0.15
	RightShoulder:SetDesiredAngle(3.14 /2)
	LeftShoulder:SetDesiredAngle(-3.14 /2)
	RightHip:SetDesiredAngle(3.14 /2)
	LeftHip:SetDesiredAngle(-3.14 /2)
end

local lastTick = 0

function move(time)
	local amplitude = 1
	local frequency = 1
  	local deltaTime = time - lastTick
  	lastTick = time

	local climbFudge = 0
	local setAngles = false

  	if (jumpAnimTime > 0) then
  		jumpAnimTime = jumpAnimTime - deltaTime
  	end

	if (pose == "FreeFall" and jumpAnimTime <= 0) then
		playAnimation("fall", fallTransitionTime, Humanoid)
	elseif (pose == "Seated") then
		stopAllAnimations()
		moveSit()
		return
	elseif (pose == "Running") then
		playAnimation("walk", 0.1, Humanoid)
	elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then
-- To adjust where your hat will be postioned on your head, go to the script line that says "h.AttachmentPos = Vector3.new(0,0,0)
-- The first number in the (0,0,0) will make your hat go to the left, or to the right, making the number positive will make your hat be
-- placed to the left, making it negative( ex. "-1") will make it be placed to the right. If your hat is pretty semetrical, you wont have to
-- adjust the first number, it stays usually in the middle, a zero.
-- Called once when the realism client is starting.
-- This is intended for compatibility with AeroGameFramework modules,
-- but the function will automatically be called if executed from a LocalScript.



function CharacterRealism:Start()
	assert(not _G.DefineRealismClient, "Realism can only be started once on the client!")
	_G.DefineRealismClient = true
	
	for key, value in pairs(Config) do
		self[key] = value
	end
	
	for _,humanoid in pairs(CollectionService:GetTagged(self.BindTag)) do
		self:OnHumanoidAdded(humanoid)
	end
	
	self:Connect("UpdateLookAngles", RunService.Heartbeat)
	self:Connect("OnLookReceive", self.SetLookAngles.OnClientEvent)
	self:Connect("OnHumanoidAdded", CollectionService:GetInstanceAddedSignal(self.BindTag))
	
	FpsCamera:Start()
end

if script:IsA("ModuleScript") then
	-- Return the system as a module table.
	return CharacterRealism
else
	-- Sanity check
	assert(script:FindFirstAncestorOfClass("PlayerScripts"), "RealismClient must be a descendant of the PlayerScripts!")
	assert(Players.LocalPlayer, "RealismClient expects a Player on the client to automatically start execution!")	
	
	-- Start automatically.
	CharacterRealism:Start()
end
------//High Ready Animations


self.RightHighReady = CFrame.new(-1, -.5, -1.25) * CFrame.Angles(math.rad(-160), math.rad(0), math.rad(0));
self.LeftHighReady 	= CFrame.new(.85,-0.35,-1.15) * CFrame.Angles(math.rad(-170),math.rad(60),math.rad(15));
-- If at 0, audio player will start right away because audio starts at 0 time position
-- Open to alternatives


local startingTimePositionValue = 0

function Clock.new(timeId)
	local timePosition = Instance.new("NumberValue") -- Could this be slow, does that matter
	timePosition.Name = timeId
	timePosition.Parent = ReplicatedStorage

	local self = {
		initialTimePosition = startingTimePositionValue,
		initialClockTime = nil,
		timePosition = timePosition,
		timeKeepingConnection = nil,
		pauseTime = nil,
	}
	setmetatable(self, Clock)

	return self
end

function Clock:getCurrentTime()
	return os.clock()
end

function Clock:_keepTrackOfTime()
	self:_stopTrackingTime()
	self.initialClockTime = self:getCurrentTime()

	self.timeKeepingConnection = self.RunService.Heartbeat:Connect(function()
		if self.pauseTime then
			self.timePosition.Value = self.pauseTime
		else
			local differenceSinceCall = self:getCurrentTime() - self.initialClockTime
			self.timePosition.Value = differenceSinceCall + self.initialTimePosition
		end
	end)

	return
end

function Clock:Pause()
	self.pauseTime = self.timePosition.Value
	self.pausedAtTime = self:getCurrentTime()
end

function Clock:Unpause()
	self.pauseTime = nil
	self.pausedAtTime = self.pausedAtTime or 0
	self.initialClockTime = self.initialClockTime + (self:getCurrentTime() - self.pausedAtTime)
end

function Clock:_stopTrackingTime()
	if self.timeKeepingConnection then
		self.timeKeepingConnection:Disconnect()
		self.timeKeepingConnection = nil
	end
end

function Clock:StartTime()
	-- TODO: use luke's coroutine wrap because of silencable errors
	coroutine.wrap(function()
		self:_keepTrackOfTime()
	end)()
end

function Clock:ResetTime()
	self:_stopTrackingTime()

	self.timePosition.Value = startingTimePositionValue
	self.initialTimePosition = startingTimePositionValue
end

function Clock:SetTime(timePositionValue)
	self:_stopTrackingTime()

	self.timePosition.Value = timePositionValue
	self.initialTimePosition = timePositionValue
end

return Clock
-------------------------------------------------------------------------------------------------------------------------


upgradeStuff = model:clone()
wait(1)
model:remove()
owner = script.Parent.Parent.Parent.OwnerName 
local ting = 0
function onTouched(hit)
	if ting == 0 then
	ting = 1
	check = hit.Parent:FindFirstChild("Humanoid")
	if check ~= nil then
	if hit.Parent.Name == owner.Value then
		local user = game.Players:GetPlayerFromCharacter(hit.Parent)
		local stats = user:findFirstChild("leaderstats")
		if stats ~= nil then
			local cash = stats:findFirstChild("Cash")
			if cash.Value > (Upgradecost-1) then
				cash.Value = cash.Value - Upgradecost
				upgradeStuff.Parent = script.Parent.Parent.Parent
				script.Parent.Parent:remove()
			end
		end
	end
	end
	ting = 0
	end
end
script.Parent.Touched:connect(onTouched)
--[[Manage Plugins]]


	
	script.Parent["A-Chassis Interface"].Car.Value=car
	for i,v in pairs(script.Parent.Plugins:GetChildren()) do
		for _,a in pairs(v:GetChildren()) do
			if a:IsA("RemoteEvent") or a:IsA("RemoteFunction") then 
				a.Parent=car
				for _,b in pairs(a:GetChildren()) do
					if b:IsA("Script") then b.Disabled=false end
				end	
			end
		end
		v.Parent = script.Parent["A-Chassis Interface"]
	end
	script.Parent.Plugins:Destroy()
--[[
		___      _______                _     
	   / _ |____/ ___/ /  ___ ____ ___ (_)__ 
	  / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-<
	 /_/ |_|   \___/_//_/\_,_/___/___/_/___/
 						SecondLogic @ Inspare
]]


local FE = workspace.FilteringEnabled
local car = script.Parent.Car.Value
local handler = car:WaitForChild("AC6_FE_Sounds")
local _Tune = require(car["A-Chassis Tune"])
local on = 0
local throt=0
local redline=0

script:WaitForChild("Rev")


for i,v in pairs(car.DriveSeat:GetChildren()) do
	for _,a in pairs(script:GetChildren()) do
		if v.Name==a.Name then v:Stop() wait() v:Destroy() end
	end
end

handler:FireServer("newSound","Rev",car.DriveSeat,script.Rev.SoundId,0,script.Rev.Volume,true)
handler:FireServer("playSound","Rev")
car.DriveSeat:WaitForChild("Rev")

while wait() do
	local _RPM = script.Parent.Values.RPM.Value
	
	if script.Parent.Values.Throttle.Value <= _Tune.IdleThrottle/100 then
		throt = math.max(.3,throt-.2)	
	else
		throt = math.min(1,throt+.1)	
	end	
	if script.Parent.Values.RPM.Value > _Tune.Redline-_Tune.RevBounce/4 and script.Parent.Values.Throttle.Value > _Tune.IdleThrottle/100 then
		redline=.5
	else
		redline=1
	end
	if not script.Parent.IsOn.Value then on=math.max(on-.015,0) else on=1 end
	local Pitch = math.max((((script.Rev.SetPitch.Value + script.Rev.SetRev.Value*_RPM/_Tune.Redline))*on^2),script.Rev.SetPitch.Value)
	if FE then
		handler:FireServer("updateSound","Rev",script.Rev.SoundId,Pitch,script.Rev.Volume)
	else
		car.DriveSeat.Rev.Pitch = Pitch
	end
end
--[[Rear]]

--
Tune.RSusDamping	= 50 		-- Dampening
Tune.RSusStiffness	= 1000000		-- Stiffness

Tune.RSusLength		= 0 		-- Suspension length (in studs)
Tune.RPreComp		= 0 		-- Vehicle height, relative to your suspension settings
Tune.RExtLimit		= 0		-- Max Extension Travel (in studs)
Tune.RCompLimit		= 0 		-- Max Compression Travel (in studs)

Tune.RBaseOffset	= {				-- Suspension base point
	--[[Lateral]]		0		,	-- positive = outward
	--[[Vertical]]		-0.1		,	-- positive = upward
	--[[Forward]]		0		}	-- positive = forward

Tune.RBricksVisible	= false 	-- Makes the front suspension bricks visible (Debug)
Tune.RConstsVisible	= false 	-- Makes the front suspension constraints visible (Debug)
-- Used to sanitize user-supplied functions


local function AssertTypes(param, ...)
	local allowedTypes = {}
	local typeString = ''
	for _, typeName in pairs({...}) do
		allowedTypes[typeName] = true
		typeString = typeString .. (typeString == '' and '' or ' or ') .. typeName
	end
	local theType = type(param)
	assert(allowedTypes[theType], typeString .. " type expected, got: " .. theType)
end
--------------MADE BY Radioaktiivinen
--------------Should be configurable with some crappy configuration tool of roblox >_>


local seat=script.Parent
local data=seat.Configuration
local owner=nil
local running=false
local x=0
local y=0

seat.ChildAdded:connect(
function(w)
if w.className=="Weld" and w.Name=="SeatWeld" then
local char=w.Part1.Parent
local player=game.Players:FindFirstChild(char.Name)
if player~=nil then
owner=player
seat.ChildRemoved:connect(
function(w2)
if w2==w then
owner=nil
end
end
)
seat.BodyVelocity.maxForce=Vector3.new(1,1,1)*data.MaxForce.Value
seat.BodyGyro.maxTorque=Vector3.new(1,1,1)*50000
local spd=0
local gui=seat.ScreenGui:clone()
gui.Parent=player.PlayerGui
gui.Frame.Faster.MouseButton1Click:connect(
function()
spd=math.min(spd+data.MaxSpeed.Value/20,data.MaxSpeed.Value)
gui.Frame.Speed.Text=math.floor(spd)
end
)
gui.Frame.Slower.MouseButton1Click:connect(
function()
spd=math.max(spd-data.MaxSpeed.Value/20,0)
gui.Frame.Speed.Text=math.floor(spd)
end
)
while owner==player do
seat.BodyVelocity.velocity=seat.CFrame.lookVector*spd
wait()
end
gui:remove()
seat.BodyVelocity.velocity=Vector3.new(0,0,0)
seat.BodyVelocity.maxForce=Vector3.new(0,0,0)
seat.BodyGyro.maxTorque=Vector3.new(0,0,0)
end
end
end
)

seat.Changed:connect(
function()
if not running then
local cur=seat.Steer
local cur2=seat.Throttle
running=true
while (cur~=0 or cur2~=0) do
y=y-seat.Steer*data.TurnSpeed.Value
x=x-seat.Throttle*data.TurnSpeed.Value
seat.BodyGyro.cframe=CFrame.new(0,0,0)*CFrame.Angles(0,math.rad(y),0)*CFrame.Angles(math.rad(x),0,0)
wait()
end
running=false
end
end
)
--Function For Making New Ray Bricks


function makeRay(cframe, size)
	local p						= Instance.new("Part")
	p.Name						= "RayPart"
	p.BrickColor				= BrickColor.new("New Yeller")
	p.Material                  = "Neon"
	p.Transparency				= 0.5
	p.Anchored					= true
	p.CanCollide				= false
	p.TopSurface				= Enum.SurfaceType.Smooth
	p.BottomSurface				= Enum.SurfaceType.Smooth
	p.formFactor				= Enum.FormFactor.Custom
	p.CFrame					= cframe
	p.Size						= size
	p.Parent					= m
	ignoreList[#ignoreList+1]	= p
end



round					= Instance.new("Part")
round.Name				= "RayPart"
round.Material          = "Neon"
round.Transparency		= 0.5
round.Anchored			= true
round.CanCollide		= false
round.TopSurface		= Enum.SurfaceType.Smooth
round.BottomSurface		= Enum.SurfaceType.Smooth
round.formFactor		= Enum.FormFactor.Custom
round.BrickColor		= BrickColor.new("New Yeller")
yOffset					= -0.2
-- ROBLOX deviation: used to communicate with the TestEZ test runner


local JEST_TEST_CONTEXT = "__JEST_TEST_CONTEXT__"

local function getCoreScriptSyncService()
	local success, result = pcall(function()
		return game:GetService("CoreScriptSyncService")
	end)

	return success and result or nil
end
local CoreScriptSyncService = nil

local LuauPolyfill = require(Packages.LuauPolyfill)
local Array = LuauPolyfill.Array
local Error = LuauPolyfill.Error
type Error = LuauPolyfill.Error
local Object = LuauPolyfill.Object
local Set = LuauPolyfill.Set
-- Unequip logic here


function OnUnequipped()
	LeftButtonDown = false
	Reloading = false
	MyCharacter = nil
	MyHumanoid = nil
	MyTorso = nil
	MyPlayer = nil
	MyMouse = nil
	if OnFireConnection then
		OnFireConnection:disconnect()
	end
	if OnReloadConnection then
		OnReloadConnection:disconnect()
	end
	if FlashHolder then
		FlashHolder = nil
	end
	if WeaponGui then
		WeaponGui.Parent = nil
		WeaponGui = nil
	end
	if RecoilTrack then
		RecoilTrack:Stop()
	end
end

local function SetReticleColor(color)
	if WeaponGui and WeaponGui:FindFirstChild('Crosshair') then
		for _, line in pairs(WeaponGui.Crosshair:GetChildren()) do
			if line:IsA('Frame') then
				line.BorderColor3 = color
			end
		end
	end
end


Tool.Equipped:connect(OnEquipped)
Tool.Unequipped:connect(OnUnequipped)

while true do
	wait(0.033)
	if WeaponGui and WeaponGui:FindFirstChild('Crosshair') and MyMouse then
		WeaponGui.Crosshair.Position = UDim2.new(0, MyMouse.X, 0, MyMouse.Y)
		SetReticleColor(NeutralReticleColor)

		local target = MyMouse.Target
		if target and target.Parent then
			local player = PlayersService:GetPlayerFromCharacter(target.Parent)
			if player then
				if MyPlayer.Neutral or player.TeamColor ~= MyPlayer.TeamColor then
					SetReticleColor(EnemyReticleColor)
				else
					SetReticleColor(FriendlyReticleColor)
				end
			end
		end
	end
	if Spread and not IsShooting then
		local currTime = time()
		if currTime - LastSpreadUpdate > FireRate * 2 then
			LastSpreadUpdate = currTime
			Spread = math.max(MinSpread, Spread - AimInaccuracyStepAmount)
			UpdateCrosshair(Spread, MyMouse)
		end
	end
end
--[=[
	@return Shake
	Creates a new shake with identical properties as
	this one. This does _not_ clone over playing state,
	and thus the cloned instance will be in a stopped
	state.

	A use-case for using `Clone` would be to create a module
	with a list of shake presets. These presets can be cloned
	when desired for use. For instance, there might be presets
	for explosions, recoil, or earthquakes.

	```lua
	--------------------------------------
	-- Example preset module
	local ShakePresets = {}

	local explosion = Shake.new()
	-- Configure `explosion` shake here
	ShakePresets.Explosion = explosion

	return ShakePresets
	--------------------------------------

	-- Use the module:
	local ShakePresets = require(somewhere.ShakePresets)
	local explosionShake = ShakePresets.Explosion:Clone()
	```
]=]


function Shake:Clone()
	local shake = Shake.new()
	local cloneFields = {
		"Amplitude", "Frequency", "FadeInTime",
		"FadeOutTime", "SustainTime", "Sustain",
		"PositionInfluence", "RotationInfluence",
		"TimeFunction"
	}
	for _,field in ipairs(cloneFields) do
		shake[field] = self[field]
	end
	return shake
end
--[[ Local Functions ]]

--
local function onShiftLockToggled()
	IsShiftLocked = not IsShiftLocked
	if IsShiftLocked then
		ShiftLockIcon.Image = SHIFT_LOCK_ON
		Mouse.Icon = SHIFT_LOCK_CURSOR
	else
		ShiftLockIcon.Image = SHIFT_LOCK_OFF
		Mouse.Icon = ""
	end
	ShiftLockController.OnShiftLockToggled:Fire()
end

local function initialize()
	if ScreenGui then
		ScreenGui:Destroy()
		ScreenGui = nil
	end
	ScreenGui = Instance.new('ScreenGui')
	ScreenGui.Name = "ControlGui"
	
	local frame = Instance.new('Frame')
	frame.Name = "BottomLeftControl"
	frame.Size = UDim2.new(0, 130, 0, 46)
	frame.Position = UDim2.new(0, 0, 1, -46)
	frame.BackgroundTransparency = 1
	frame.Parent = ScreenGui
	
	ShiftLockIcon = Instance.new('ImageButton')
	ShiftLockIcon.Name = "MouseLockLabel"
	ShiftLockIcon.Size = UDim2.new(0, 31, 0, 31)
	ShiftLockIcon.Position = UDim2.new(0, 12, 0, 2)
	ShiftLockIcon.BackgroundTransparency = 1
	ShiftLockIcon.Image = IsShiftLocked and SHIFT_LOCK_ON or SHIFT_LOCK_OFF
	ShiftLockIcon.Visible = IsShiftLockMode
	ShiftLockIcon.Parent = frame
	
	ShiftLockIcon.MouseButton1Click:connect(onShiftLockToggled)
	
	ScreenGui.Parent = PlayerGui
end
--[=[
	@param tbl table
	@param name string
	@param inboundMiddleware ServerMiddleware?
	@param outboundMiddleware ServerMiddleware?
	@return RemoteFunction

	Binds a function to a table method. The name must match the
	name of the method in the table. The same name will be used
	on the client to access the given function.

	```lua
	local MyObject = {
		_Data = 10,
	}

	function MyObject:GetData(player: Player)
		return self._Data
	end

	serverComm:WrapMethod(MyObject, "GetData")
	```
]=]


function ServerComm:WrapMethod(tbl: {}, name: string, inboundMiddleware: Types.ServerMiddleware?, outboundMiddleware: Types.ServerMiddleware?): RemoteFunction
	return Comm.WrapMethod(self._instancesFolder, tbl, name, inboundMiddleware, outboundMiddleware)
end
-- int rd_int_basic(string src, int s, int e, int d)
-- @src - Source binary string
-- @s - Start index of a little endian integer
-- @e - End index of the integer
-- @d - Direction of the loop


local function rd_int_basic(src, s, e, d)
	local num = 0

	-- if bb[l] > 127 then -- signed negative
	-- 	num = num - 256 ^ l
	-- 	bb[l] = bb[l] - 128
	-- end

	for i = s, e, d do num = num + src:byte(i, i) * 256 ^ (i - s) end

	return num
end