Pinkstack/roblox-luau-corpus-text huggingface dataset:
--[[
	TYPES:
	Crater
	Orbit
	Path
	Rounded Path
	Closed Path
	Wall Break
	Expanding Crater
	Expanding Orbit
	
	------------------------------
	PROPERTIES:
	
	PartCount -- INTEGER NUMBER TO DICTATE THE AMOUNT OF PARTS IN AN ORBIT/CRATER ATTACK 
	Radius -- SIZE OF A CRATER/ORBIT // For expanding you must put it in list like so: {3,10}. The first value is the staring radius, and the second being the ending radius.
	Range -- RAYCAST MAX DISTANCE DOWNWARDS
	Size -- VECTOR3 VALUE DICTATING PART SIZE
	AnimationSpeed -- HOW FAST THE PARTS SPAWN UPWARDS
	BlockSize -- THE SIZE OF A BLOCK IN A PATH (NOTE: RUN THIS VIA A LIST VALUE: {3,4} THE FIRST BEING THE INITIAL SIZE AND THE SECOND BEING THE FINAL SIZE)
	Width -- THE WIDTH OF A PATH (NOTE: RUN THIS VIA A LIST VALUE: {3,4} THE FIRST BEING THE INITIAL WIDTH AND THE SECOND BEING THE FINAL WIDTH)
	Distance -- THIS IS A PATH TRAVELS
	stepSize -- DISTANCE BETWEEN THE PATH PARTS
	HoldTime -- TIME IN SECONDS BEFORE AN EFFECT DISAPPEARS
	delayTime -- TIME BETWEEN NEXT PART IN PATH (NOTE: PUTTING THIS TO "Stepped" MAKES THE DELAY TIME RUN IN A RUNSERVICE HEARTBEAT)
	Angle -- CRATER ANGLE
	Height -- HEIGHT OF AN EXPLOSION
	Collidable -- PART COLLIDABLILITY FOR WALLBREAK AND FOR EXPLOSION
	IncreaseSpeed -- THIS IS TO CHANGE THE ANIMATION SPEED FOR EXPANDING ORBITS OR EXPANDING CRATERS
	
	
	SET UP:
	[[		NEW		]]
--[[
	local craterEffects = require(craterModule)

	craterEffects.new(Type, AnchorPoint, Properties)

	-- Lets try using orbit with a 5 radius and 8 part count at a tween speed of 0.2
	
	
	craterEffects.new(
	'Orbit', -- This is the type of effect you want
	Character.HumanoidRootPart.CFrame, -- This is the start/center point (depending on the effect)
	{
	['AnimationSpeed'] = 0.2;
	['PartCount'] = 8;
	['Radius'] = 5
	}
	)
]]
--[[		PRESETS		]]
--[[
	local craterEffects = require(craterModule)

	craterEffects.presets(Presets, AnchorPoint, Extras)

	-- This allows you to save presets using the instructions within the 'Presets' script.
	
	
	craterEffects.presets(
	'OFA', -- This is the type of effect you want
	Character.HumanoidRootPart.CFrame, -- This is the start/center point (depending on the effect)
	{
	['AnimationSpeed'] = 0.2;
	['PartCount'] = 8;
	['Radius'] = 5
	}
	)
]]




local Presets = require(script:WaitForChild('Presets'))
local Functions = require(script:WaitForChild('Styles'))

callback = function(called, ErrorType)
	return warn('CRATER MODULE ERROR:\n					'..called..' does not exist as a '..ErrorType)
end
return {
	['new'] = function(Type : string, AnchorPoint : CFrame, ... : dict)
		if Functions[Type] then
			Functions[Type](AnchorPoint, ...)
		else callback(Type, 'type')
		end
		
	end,
	['presets'] = function(Preset : string, AnchorPoint : CFrame, ... : dict)
		if Presets[Presets] then
			local Type, Settings = Presets[Preset](...)
			Functions[Type](AnchorPoint, Settings)
		else callback(Preset, 'preset')
		end
	end,
	
}
--[=[
	@within TableUtil
	@function Truncate
	@param tbl table
	@param length number
	@return table

	Returns a new table truncated to the length of `length`.

	```lua
	local t = {10, 20, 30, 40, 50, 60, 70, 80}
	local tTruncated = TableUtil.Truncate(t, 3)
	print(tTruncated) --> {10, 20, 30}
	```
]=]


local function Truncate(tbl: Table, len: number): Table
	return table.move(tbl, 1, len, 1, table.create(len))
end
-- Initialize the tool


local TextureTool = {
	Name = 'Texture Tool';
	Color = BrickColor.new 'Bright violet';

	-- Default options
	Type = 'Decal';
	Face = Enum.NormalId.Front;

	-- Signals
	OnFaceChanged = Signal.new();
}

TextureTool.ManualText = [[<font face="GothamBlack" size="16">Texture Tool  🛠</font>
Lets you add decals and textures to parts.<font size="6"><br /></font>

<b>TIP: </b>Click on any part's surface to quickly change a decal/texture's side.<font size="6"><br /></font>

<b>TIP: </b>You can paste the link to any decal and it'll automatically get the right image ID.<font size="6"><br /></font>

<b>NOTE: </b>If HttpService isn't enabled, you must manually type an image's ID.]]
--------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------



function reverseGlobalMarket(player)
	
	local save = _L.Saving.Get(player)
	if not save then
		return
	end	
	
	if save.HasReversedGlobalMarket then
		return
	end
	
	wait(2)
	
	-- add all auction postings back into the player's inventory
	local liveAuctions = _L.Functions.CloneTable(save.Auctions)
	save.Auctions = {}
	for _, auctionListing in ipairs(liveAuctions) do
		local quantity  = auctionListing.quantity
		local itemID    = auctionListing.itemID
		local className = auctionListing.className
		local payload = {
			quantity = quantity,
			itemID = itemID,
			className = className
		}
		table.insert(save.ReversedAuctionPostings, payload)
		_L.Inventory.AddItem(player, className, itemID, quantity)
	end
	
	save.HasReversedGlobalMarket = true
	
end
-- ScreenSpace -> WorldSpace. Taking a screen width, and a depth to put an object 
-- at, and returning a size of how big that object has to be to appear that size
-- at that depth.


function ScreenSpace.ScreenToWorldByWidthDepth(x, y, screenWidth, depth)
	local aspectRatio = ScreenSpace.AspectRatio()
	local hfactor = math.tan(math.rad(Workspace.CurrentCamera.FieldOfView)/2)
	local wfactor = aspectRatio*hfactor
	local sx, sy = ScreenSpace.ViewSizeX(), ScreenSpace.ViewSizeY()
	--
	local worldWidth = (screenWidth/sx) * 2 * -wfactor * depth
	--
	local xf, yf = x/sx*2 - 1, y/sy*2 - 1
	local xpos = xf * -wfactor * depth
	local ypos = yf *  hfactor * depth
	--
	return Vector3.new(xpos, ypos, depth), worldWidth
end
----------------------------------------------------------------
----------------------------------------------------------------
----------------------------------------------------------------
----------------------------------------------------------------
----------------------------------------------------------------



local function Create(ty,data)
	local obj
	if type(ty) == 'string' then
		obj = Instance_new(ty)
	else
		obj = ty
	end
	for k, v in pairs(data) do
		if type(k) == 'number' then
			v.Parent = obj
		else
			obj[k] = v
		end
	end
	return obj
end

local barActive = false
local activeOptions = {}

function createDDown(dBut, callback,...)
	if barActive then
		for i,v in pairs(activeOptions) do
			v:Destroy()
		end
		activeOptions = {}
		barActive = false
		return
	else
		barActive = true
	end
	local slots = table.pack(...)
	local base = dBut
	for i,v in ipairs(slots) do
		local newOption = base:Clone()
		newOption.ZIndex = 5
		newOption.Name = "Option "..tostring(i)
		newOption.Parent = base.Parent.Parent.Parent
		newOption.BackgroundTransparency = 0
		newOption.BackgroundColor3 = Color3.fromRGB(24, 24, 29)
		newOption.BorderSizePixel = 0
		newOption.ZIndex = 2
		table.insert(activeOptions,newOption)
		newOption.Position = UDim2_new(-0.4, dBut.Position.X.Offset, dBut.Position.Y.Scale, dBut.Position.Y.Offset + (#activeOptions * dBut.Size.Y.Offset))
		newOption.Text = slots[i]
		newOption.MouseButton1Down:connect(function()
			dBut.Text = slots[i]
			callback(slots[i])
			for i,v in pairs(activeOptions) do
				v:Destroy()
			end
			activeOptions = {}
			barActive = false
		end)
	end
end
--[[
	Updates the height of a ScrollingFrame canvas to match the
	AbsoluteContentSize of a UIListLayout whenever it changes.

	This shouldn't be necessary if AutomaticCanvasSize worked
	properly, but it doesn't seem to in all cases, especially
	if a UIAspectRatio exists in a list item in the scrolling frame.
--]]



local function autoSizeCanvasHeight(scrollingFrame: ScrollingFrame)
	local listLayout = scrollingFrame:FindFirstChildOfClass("UIListLayout")
	assert(
		listLayout,
		string.format("Unable to find a UIListLayout inside scrollingFrame %s", scrollingFrame:GetFullName())
	)

	local connection = listLayout:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(function()
		scrollingFrame.CanvasSize = UDim2.new(1, 0, 0, listLayout.AbsoluteContentSize.Y)
	end)

	scrollingFrame.CanvasSize = UDim2.new(1, 0, 0, listLayout.AbsoluteContentSize.Y)

	return connection
end

return autoSizeCanvasHeight
--[[Engine]]


	--Torque Curve
	Tune.Horsepower		= 158		--	[TORQUE CURVE VISUAL]
	Tune.IdleRPM		= 700		--		https://www.desmos.com/calculator/2uo3hqwdhf
	Tune.PeakRPM		= 6500		--		Use sliders to manipulate values
	Tune.Redline		= 7000.01		--		Copy and paste slider values into the respective tune values
	Tune.EqPoint		= 6500
	Tune.PeakSharpness	= 7.5
	Tune.CurveMult		= 0.16
	
	--Incline Compensation
	Tune.InclineComp	= 1.7			-- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees)
	
	--Misc
	Tune.RevAccel		= 100		-- RPM acceleration when clutch is off
	Tune.RevDecay		= 75		-- RPM decay when clutch is off
	Tune.RevBounce		= 500		-- RPM kickback from redline
	Tune.IdleThrottle	= 3			-- Percent throttle at idle
	Tune.ClutchTol		= 500		-- Clutch engagement threshold (higher = faster response)
--[[**
	Runs the specified function in a separate thread, without yielding the current thread. This doesn't obscure errors like spawn or coroutines do, but it does share the similar small delay that spawn has. Also allows passing arguments like coroutines do.

	@param [t:callback] Function The function you are executing.
	@param [variant] ... The optional arguments you can pass that the function will execute with.
	@returns [void]
**--]]


function Scheduler.SpawnDelayed(Function, ...)
	local Length = select("#", ...)
	if Length > 0 then
		local Arguments = {...}
		local Connection

		Connection = Heartbeat:Connect(function()
			Connection:Disconnect()
			Function(table.unpack(Arguments, 1, Length))
		end)
	else
		local Connection

		Connection = Heartbeat:Connect(function()
			Connection:Disconnect()
			Function()
		end)
	end
end
--[=[
	Detects if a dictionary has a certain value.
	
	```lua
	local Array = { "Has", "this", "thing" }
	
	print(TableKit.HasValue(Array, "Has")) -- prints true
	```
	
	@within TableKit
	@param tbl table
	@param value unknown
	@return boolean
]=]


function TableKit.HasValue(tbl: { [unknown]: unknown }, value: unknown): boolean
	for _, v in tbl do
		if v == value then
			return true
		end
	end
	return false
end
-- ROBLOX MOVED: expect/utils.lua


local function subsetEquality(object: any, subset: any): boolean | nil
	-- subsetEquality needs to keep track of the references
	-- it has already visited to avoid infinite loops in case
	-- there are circular references in the subset passed to it
	local function subsetEqualityWithContext(seenReferences_: { [any]: boolean }?)
		local seenReferences = seenReferences_ or {}

		return function(object_: any, subset_: any): boolean | nil
			if not isObjectWithKeys(subset_) then
				return nil
			end

			return Array.every(Object.keys(subset_), function(key)
				if isObjectWithKeys(subset_[key]) then
					if seenReferences[subset_[key]] then
						--[[
								ROBLOX TODO: (ADO-1217) replace the line below
								once Map/Set functionality is implemented

								return equals(localObject[key], localSubset[key], {iterableEquality})
							]]
						return equals(object_[key], subset_[key], { iterableEquality })
					end
					seenReferences[subset_[key]] = true
				end
				local result = object_ ~= nil
					and hasPropertyInObject(object_, key)
					and equals(object_[key], subset_[key], {
						--[[
									ROBLOX TODO: (ADO-1217) uncomment the line
									iterableEquality,
								]]
						subsetEqualityWithContext(seenReferences),
					})
				-- The main goal of using seenReference is to avoid
				-- circular node on tree.
				-- It will only happen within a parent and its child, not a
				-- node and nodes next to it (same level)
				-- We should keep the reference for a parent and its child
				-- only
				-- Thus we should delete the reference immediately so that
				-- it doesn't interfere other nodes within the same level
				-- on tree.
				seenReferences[subset_[key]] = nil
				return result
			end)
		end
	end

	return subsetEqualityWithContext()(object, subset)
end
-----------------------------------------ONLY EDIT THESE VALUES!!!!!-----------------------------------------
-----!Instructions!-----
--Make sure you have a part in the gun named Barrel, it is where the raycast will shoot from.--
--Just place this script into any gun and edit the values below.--
--Editting anything else will risk breaking it.--
------------------------


Damage = 20
SPS = 13 -- Shots Per Second, gives a limit of how fast the gun shoots.
Recoil = 5 -- [1-10] [1 = Minigun, 10 = Sniper]
WallShoot = false -- Shoots through walls.
GH = false -- [True = RB can't hurt RB.] [False = RB can hurt RB.]
BulletColor = "Cool yellow" -- Any Brickcolor will work.
Flash = true
-- 0-9


for Index = 48, 57 do
	table.insert(Alphabet, Index)
end

table.insert(Alphabet, 43) -- +
table.insert(Alphabet, 47) -- /

for Index, Character in ipairs(Alphabet) do
	Indexes[Character] = Index
end

local Base64 = {}

local bit32_rshift = bit32.rshift
local bit32_lshift = bit32.lshift
local bit32_band = bit32.band
--//Controller//--


for _, Giver in pairs(ToolGivers:GetChildren()) do
	if Giver:IsA("BasePart") or Giver:IsA("Model") then
		local Trigger = Giver.ProximityPrompt
		
		Trigger.Triggered:Connect(function(Player)
			local Backpack = Player.Backpack
			
			if not Backpack:FindFirstChild(Giver.Name) then
				local Tool = Tools:FindFirstChild(Giver.Name)
				
				if Tool then
					Tool:Clone().Parent = Backpack
					
				end
			end
		end)
	end
end
-- DOUBLE JUMPING SCRIPT --



local UserInputService = game:GetService("UserInputService")
local localPlayer = game.Players.LocalPlayer
local character
local humanoid
 
local canDoubleJump = false
local hasDoubleJumped = false
local oldPowerlocal TIME_BETWEEN_JUMPS = 0.1
local DOUBLE_JUMP_POWER_MULTIPLIER = 1.5

function onJumpRequest()
	if not character or not humanoid or not character:IsDescendantOf(workspace) or
	 humanoid:GetState() == Enum.HumanoidStateType.Dead then
		return
	end
 
	if canDoubleJump and not hasDoubleJumped then
		hasDoubleJumped = true
		humanoid.JumpPower = oldPower * DOUBLE_JUMP_POWER_MULTIPLIER		humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
	end
end
 
local function characterAdded(newCharacter)
	character = newCharacter
	humanoid = newCharacter:WaitForChild("Humanoid")
	hasDoubleJumped = false
	canDoubleJump = false
	oldPower = humanoid.JumpPower 
	humanoid.StateChanged:connect(function(old, new)
		if new == Enum.HumanoidStateType.Landed then
			canDoubleJump = false
			hasDoubleJumped = false
			humanoid.JumpPower = oldPower		elseif new == Enum.HumanoidStateType.Freefall then
			wait(TIME_BETWEEN_JUMPS)			canDoubleJump = true
		end
	end)
end
 
if localPlayer.Character then
	characterAdded(localPlayer.Character)
end
 
localPlayer.CharacterAdded:connect(characterAdded)
UserInputService.JumpRequest:connect(onJumpRequest)
--[=[
	@prop Stopped Signal
	@within Component

	Fired when an instance of a component is stopped.

	```lua
	local MyComponent = Component.new({Tag = "MyComponent"})

	MyComponent.Stopped:Connect(function(component) end)
	```
]=]



local CollectionService = game:GetService("CollectionService")
local RunService = game:GetService("RunService")

local Signal = require(script.Parent.Signal)
local Trove = require(script.Parent.Trove)

local IS_SERVER = RunService:IsServer()
local DEFAULT_ANCESTORS = {workspace, game:GetService("Players")}


local renderId = 0
local function NextRenderName(): string
	renderId += 1
	return "ComponentRender" .. tostring(renderId)
end


local function InvokeExtensionFn(component, extensionList, fnName: string)
	for _,extension in ipairs(extensionList) do
		local fn = extension[fnName]
		if type(fn) == "function" then
			fn(component)
		end
	end
end


local function ShouldConstruct(component, extensionList): boolean
	for _,extension in ipairs(extensionList) do
		local fn = extension.ShouldConstruct
		if type(fn) == "function" then
			local shouldConstruct = fn(component)
			if not shouldConstruct then
				return false
			end
		end
	end
	return true
end
-- Critically damped spring class for fluid motion effects


local Spring = {} do
	Spring.__index = Spring

	-- Initialize to a given undamped frequency and default position
	function Spring.new(freq, pos)
		return setmetatable({
			freq = freq,
			goal = pos,
			pos = pos,
			vel = 0,
		}, Spring)
	end

	-- Advance the spring simulation by `dt` seconds
	function Spring:step(dt: number)
		local f: number = self.freq*2*math.pi
		local g: Vector3 = self.goal
		local p0: Vector3 = self.pos
		local v0: Vector3 = self.vel

		local offset = p0 - g
		local decay = math.exp(-f*dt)

		local p1 = (offset*(1 + f*dt) + v0*dt)*decay + g
		local v1 = (v0*(1 - f*dt) - offset*(f*f*dt))*decay

		self.pos = p1
		self.vel = v1

		return p1
	end
end

CameraUtils.Spring = Spring
--------------------------------------------------------------------------------
-- Piercing raycasts



local function getCollisionPoint(origin, dir)
	local originalSize = #blacklist
	repeat
		local hitPart, hitPoint = workspace:FindPartOnRayWithIgnoreList(
			ray(origin, dir), blacklist, false, true
		)

		if hitPart then
			if hitPart.CanCollide and not Collection:HasTag(hitPart,"IgnoreCamera") then
				eraseFromEnd(blacklist, originalSize)
				return hitPoint, true
			end
			blacklist[#blacklist + 1] = hitPart
		end
	until not hitPart

	eraseFromEnd(blacklist, originalSize)
	return origin + dir, false
end
-- Battery0 --



Battery.Interaction.Touched:Connect(function(hit)
	if hit.Parent:IsA("Tool") and hit.Parent.Name == ToolRequired then
		Battery.Battery0.Transparency = 0
		if game.ReplicatedStorage.ItemSwitching.Value == true then
			hit.Parent:Destroy()
		end
		Battery.Interaction.HintGUI2.Tool1:Destroy()
		Battery.Parent.SoundPart.Insert:Play()
		Battery.Parent.Light1.Color = Color3.fromRGB(0,255,0)
		LocksLeft.Value = LocksLeft.Value - 1
		Battery.Battery1Script.Disabled = false
		Battery.Battery0Script.Disabled = true
	end
end)

Battery.Interaction.ClickDetector.MouseClick:Connect(function(plr)
	if plr.Backpack:FindFirstChild(Battery.ToolRequired.Value) then
		Battery.Battery0.Transparency = 0
		if game.ReplicatedStorage.ItemSwitching.Value == true then
			plr.Backpack:FindFirstChild(ToolRequired):Destroy()
		end
		Battery.Interaction.HintGUI2.Tool1:Destroy()
		Battery.Parent.SoundPart.Insert:Play()
		Battery.Parent.Light1.Color = Color3.fromRGB(0,255,0)
		LocksLeft.Value = LocksLeft.Value - 1
		Battery.Battery1Script.Disabled = false
		Battery.Battery0Script.Disabled = true
	end
end)
--Thanks for this, Zeph. Hope you don't mind that I essentially stole this :P



local IntWait = 0.01

local MD3 = script.Parent.Misc.TK.WPR.SS.Motor


while true do
	wait()
	if script.Parent.DriveSeat.Wipers.Value == true then
		if MD3.CurrentAngle == 0  then
			wait(IntWait)
	
			MD3.DesiredAngle = -2.78
		elseif MD3.CurrentAngle < -2.76 then
	
			MD3.DesiredAngle = 0			
		end
	end
end
-- Returns whether the inputted status passes the TextFilter, otherwise also returns an error


function UpdateProfileRemoteFunction.OnServerInvoke(playerFiring, playerSelected, statusText)
	local filteredStatus = filterText(statusText, playerSelected.UserId, playerFiring.UserId)
	if filteredStatus == statusText then
		playerFiring:SetAttribute("status", filteredStatus)
		return { success = true }
	else
		return {
			success = false,
			error = Constants.ErrorMsgs.InappropriateStatus,
		}
	end
end
--Explode into a bunch of star fragments! (Very pretty)



print("Starlight finisher activated!")

local Character = script.Parent

local Debris = (game:FindService("Debris") or game:GetService("Debris"))

local Torso = (Character:FindFirstChild("Torso") or Character:FindFirstChild("UpperTorso"))

if Torso then
	pcall(function()
		local Sparkle = script["Sparkle_Large_Blue"]
		Sparkle.Parent = Torso
		Sparkle:Emit(75)
	end)
	pcall(function()
		local ExplodeSound = script["ExplodeSound"]
		ExplodeSound.Parent = Torso
		ExplodeSound:Play()
	end)
end

for _,v in pairs(Character:GetDescendants()) do
	pcall(function()
		v.Transparency = 1
	end)
	
	pcall(function()
		v.Anchored = true
		v.CanCollide = false
		v.Parent = workspace
		
		Debris:AddItem(v, 3)
	end)
	
end
--		child.C0 = CFrame.new(0,-0.6,0)*CFrame.fromEulerAnglesXYZ(-(math.pi/2),0,0) --// Reposition player


		if child.Part1.Name == "HumanoidRootPart" then
			player = game.Players:GetPlayerFromCharacter(child.Part1.Parent)
			if player and (not player.PlayerGui:FindFirstChild("Screen")) then --// The part after the "and" prevents multiple GUI's to be copied over.
				GUI.CarSeat.Value = script.Parent --// Puts a reference of the seat in this ObjectValue, now you can use this ObjectValue's value to find the car directly.
				GUI:Clone().Parent = player.PlayerGui --// Compact version
				script.Parent.Parent.Body.Lights.RunL.Material = "Neon"
				script.Parent.Parent.Body.Lights.RunR.Material = "Neon"
				script.Parent.Parent.Body.Dash.Screen.G.Enabled = true
				script.Parent.Parent.Body.Dash.Screen2.G.Enabled = true
			end
		end
	end
end)

script.Parent.ChildRemoved:connect(function(child)
	if child:IsA("Weld") then
		if child.Part1.Name == "HumanoidRootPart" then
			game.Workspace.CurrentCamera.FieldOfView = 70
			player = game.Players:GetPlayerFromCharacter(child.Part1.Parent)
			if player and player.PlayerGui:FindFirstChild("SS3") then
				player.PlayerGui:FindFirstChild("SS3"):Destroy()
				script.Parent.Parent.Body.Lights.RunL.Material = "SmoothPlastic"
				script.Parent.Parent.Body.Lights.RunR.Material = "SmoothPlastic"
				script.Parent.Parent.Body.Dash.Screen.G.Enabled = false
				script.Parent.Parent.Body.Dash.Screen2.G.Enabled = false
			end
		end
	end	
end)
--						if _TMode == "Auto" and _CGear==-1 then throt = _GThrot end


						local tq = _OutTorque
						
						--Apply AWD Vectoring
						if _Tune.Config == "AWD" then
							local bias = (_Tune.TorqueVector+1)/2
							if v.Name=="FL" or v.Name=="FR" then
								tq = tq*(1-bias)
							elseif v.Name=="RL" or v.Name=="RR" then
								tq = tq*bias
							end
						end
						
						--Apply TCS
						local tqTCS = 1
						if _TCS then
							tqTCS = 1-(math.min(math.max(0,math.abs(v.RotVelocity.Magnitude*(v.Size.x/2) - v.Velocity.Magnitude)-_Tune.TCSThreshold)/_Tune.TCSGradient,1)*(1-(_Tune.TCSLimit/100)))
						end
						if tqTCS < 1 then
							_TCSActive = true
						end
						
						--Update Forces
						local dir = 1
						if _CGear==-1 then dir = -1 end
						v["#AV"].maxTorque=Vector3.new(math.abs(Ref.x),math.abs(Ref.y),math.abs(Ref.z))*_OutTorque*(1+(v.RotVelocity.Magnitude/60)^1.15)*throt*tqTCS*diffMult*on
						v["#AV"].angularvelocity=Ref*aRef*_spLimit*dir
					else
						v["#AV"].maxTorque=Vector3.new()
						v["#AV"].angularvelocity=Vector3.new()
					end
					
				--Brakes
				else
					local brake = (_GBrake + _CBrake)
-- double rd_dbl_basic(byte f1..8)
-- @f1..8 - The 8 bytes composing a little endian double


local function rd_dbl_basic(f1, f2, f3, f4, f5, f6, f7, f8)
	local sign = bit.rshift(f8, 7)
	local exp = bit.lshift(bit.band(f8, 0x7F), 4) + bit.rshift(f7, 4)
	local frac = bit.band(f7, 0x0F) * 2 ^ 48
	local normal = 1

	frac = frac + (f6 * 2 ^ 40) + (f5 * 2 ^ 32) + (f4 * 2 ^ 24) + (f3 * 2 ^ 16) + (f2 * 2 ^ 8) + f1 -- help

	if exp == 0 then
		if frac == 0 then
			return sign * 0
		else
			normal = 0
			exp = 1
		end
	elseif exp == 0x7FF then
		if frac == 0 then
			return sign * (1 / 0)
		else
			return sign * (0 / 0)
		end
	end

	return (-1) ^ sign * 2 ^ (exp - 1023) * (normal + frac / 2 ^ 52)
end