Pinkstack/roblox-luau-corpus-text huggingface dataset:
--Rescripted by Luckymaxer



Tool = script.Parent
Handle = Tool:WaitForChild("Handle")

Players = game:GetService("Players")

Sounds = {
	CoilSound = Handle:WaitForChild("CoilSound"),
}

Gravity = 196.20
JumpHeightPercentage = 0.25

ToolEquipped = false

function GetAllConnectedParts(Object)
	local Parts = {}
	local function GetConnectedParts(Object)
		for i, v in pairs(Object:GetConnectedParts()) do
			local Ignore = false
			for ii, vv in pairs(Parts) do
				if v == vv then
					Ignore = true
				end
			end
			if not Ignore then
				table.insert(Parts, v)
				GetConnectedParts(v)
			end
		end
	end
	GetConnectedParts(Object)
	return Parts
end

function SetGravityEffect()
	if not GravityEffect or not GravityEffect.Parent then
		GravityEffect = Instance.new("BodyForce")
		GravityEffect.Name = "GravityCoilEffect"
		GravityEffect.Parent = Torso
	end
	local TotalMass = 0
	local ConnectedParts = GetAllConnectedParts(Torso)
	for i, v in pairs(ConnectedParts) do
		if v:IsA("BasePart") then
			TotalMass = (TotalMass + v:GetMass())
		end
	end
	local TotalMass = (TotalMass * 196.20 * (1 - JumpHeightPercentage))
	GravityEffect.force = Vector3.new(0, TotalMass, 0)
end

function HandleGravityEffect(Enabled)
	if not CheckIfAlive() then
		return
	end
	for i, v in pairs(Torso:GetChildren()) do
		if v:IsA("BodyForce") then
			v:Destroy()
		end
	end
	for i, v in pairs({ToolUnequipped, DescendantAdded, DescendantRemoving}) do
		if v then
			v:disconnect()
		end
	end
	if Enabled then
		CurrentlyEquipped = true
		ToolUnequipped = Tool.Unequipped:connect(function()
			CurrentlyEquipped = false
		end)
		SetGravityEffect()
		DescendantAdded = Character.DescendantAdded:connect(function()
			wait()
			if not CurrentlyEquipped or not CheckIfAlive() then
				return
			end
			SetGravityEffect()
		end)
		DescendantRemoving = Character.DescendantRemoving:connect(function()
			wait()
			if not CurrentlyEquipped or not CheckIfAlive() then
				return
			end
			SetGravityEffect()
		end)
	end
end

function CheckIfAlive()
	return (((Character and Character.Parent and Humanoid and Humanoid.Parent and Humanoid.Health > 0 and Torso and Torso.Parent and Player and Player.Parent) and true) or false)
end

function Equipped(Mouse)
	Character = Tool.Parent
	Humanoid = Character:FindFirstChild("Humanoid")
	Torso = Character:FindFirstChild("HumanoidRootPart")
	Player = Players:GetPlayerFromCharacter(Character)
	if not CheckIfAlive() then
		return
	end
	if HumanoidDied then
		HumanoidDied:disconnect()
	end
	HumanoidDied = Humanoid.Died:connect(function()
		if GravityEffect and GravityEffect.Parent then
			GravityEffect:Destroy()
		end
	end)
	Sounds.CoilSound:Play()
	HandleGravityEffect(true)
	ToolEquipped = true
end

function Unequipped()
	if HumanoidDied then
		HumanoidDied:disconnect()
	end
	HandleGravityEffect(false)
	ToolEquipped = false
end

Tool.Equipped:connect(Equipped)
Tool.Unequipped:connect(Unequipped)
-- ================================================================================
-- LOCAL FUNCTIONS
-- ================================================================================


function Reset()
	down = {}
	state = {}
end -- Reset()

function GetState()
	-- Map KeyCodes to corresponding InputObjects on the gamepad:
	local inputObjects = UserInputService:GetGamepadState(GAMEPAD1)
	for _,inputObject in pairs(inputObjects) do
		state[inputObject.KeyCode] = inputObject
	end
end -- GetState()

function InputBegan(input, processed)
	if input.UserInputType == GAMEPAD1 then
		down[input.KeyCode] = true
		buttonDown:Fire(input.KeyCode)
	end
end -- InputBegan()

function InputEnded(input, processed)
	if input.UserInputType == GAMEPAD1 then
		down[input.KeyCode] = false
		buttonUp:Fire(input.KeyCode)
	end
end -- InputEnded()

function InputChanged(input, processed)
	if input.UserInputType == GAMEPAD1 then
		changed:Fire(input.KeyCode)
	end
end -- InputChanged()

function GamepadConnected(gamepad)
	if gamepad == GAMEPAD1 then
		Gamepad.IsConnected = true
		GetState()
		connected:Fire()
	end
end -- GamepadConnected

function GamepadDisconnected(gamepad)
	if gamepad == GAMEPAD1 then
		Gamepad.IsConnected = false
		Reset()
		disconnected:Fire()
	end
end -- GamepadDisconnected
-- This makes the loading bar fill up. Don't touch anything here!


local prog = 0

while wait() do
	prog = prog + 0.5
	script.Parent.Size = UDim2.new(prog/100, 0, 0.1, 0)
	script.Parent.Parent.LoadingLabel.Text = ("Loading...   " ..math.floor(prog*2).. "%")
	if prog == 50 then
		wait(1)
		script.Parent.Parent.Parent:Destroy()
	end
end
--//Main Function


ProximityPrompt.Triggered:Connect(function(Player)
	local Character = Player.Character
	local Head = Character:WaitForChild("Head")
	ProximityPrompt.ActionText = ""
	if Character:FindFirstChild(script.Parent.Parent.Parent.Name) then
		Character[script.Parent.Parent.Parent.Name]:Destroy()
	else
		local NewArmor = Armor:Clone()
		NewArmor:SetPrimaryPartCFrame(Head.CFrame)
		NewArmor.PrimaryPart:Destroy()
		ProximityPrompt.ActionText = ""
		for _, part in pairs (NewArmor:GetChildren()) do
			if part:IsA("BasePart") then
				WeldParts(Head, part)
				part.CanCollide = false
				part.Anchored = false
			end
		end
		NewArmor.Parent = Character
	end
end)
--// # key, ManOff


mouse.KeyUp:connect(function(key)
	if key=="f" then 
		veh.Lightbar.middle.Man:Stop()
		veh.Lightbar.middle.Wail.Volume = 8
		veh.Lightbar.middle.Yelp.Volume = 8
		veh.Lightbar.middle.Priority.Volume = 8
		script.Parent.Parent.Sirens.Man.BackgroundColor3 = Color3.fromRGB(62, 62, 62)
		veh.Lightbar.MAN.Transparency = 1
	end
end)
--[[
	Novena Constraint Type: Motorcycle
			The Bike Chassis
	
				SecondLogic | Inspare (thanks!)
				Avxnturador | Novena
--]]




local autoscaling	= true					--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
	}
}
--------------------------------------------------------------#


function Tween(instance,tweeninformation,goals)
	TweenService:Create(instance,tweeninformation,goals):Play()
end
LightGroup = script.Parent.Lights:GetChildren()
while true do
	wait(0)
	if script.Parent.on.Value then
		for i = 1,#LightGroup do
			Tween(LightGroup[i],TweenInfo.new(deltatime),{Transparency = 0})
			Tween(LightGroup[i].Light,TweenInfo.new(deltatime),{Brightness = 2})
		end
	else
		for i = 1,#LightGroup do
			Tween(LightGroup[i],TweenInfo.new(deltatime),{Transparency = 1})
			Tween(LightGroup[i].Light,TweenInfo.new(deltatime),{Brightness = 0})
		end
	end
end
--[[Weight and CG]]


	Tune.Weight			= 1100		-- Total weight (in pounds)
	Tune.WeightBSize	= {			-- Size of weight brick (dimmensions in studs ; larger = more stable)
	 --[[Width]]		6		,
	 --[[Height]]		3.5		,
	 --[[Length]]		14		}
	Tune.WeightDist		= 50		-- Weight distribution (0 - on rear wheels, 100 - on front wheels, can be <0 or >100)
	Tune.CGHeight		= .8		-- Center of gravity height (studs relative to median of all wheels)
	Tune.WBVisible		= false		-- Makes the weight brick visible
	
	--Unsprung Weight
	Tune.FWheelDensity	= .1		-- Front Wheel Density
	Tune.RWheelDensity	= .1		-- Rear Wheel Density
	Tune.FWLgcyDensity	= 1			-- Front Wheel Density [PGS OFF]
	Tune.RWLgcyDensity	= 1			-- Rear Wheel Density [PGS OFF]
	
	Tune.AxleSize		= 2			-- Size of structural members (larger = more stable/carry more weight)
	Tune.AxleDensity	= .1		-- Density of structural members
-- excluding the `+` and `*` character, since findOr tests and graphql use them explicitly


local luaPatternCharacters = "([" .. ("$%^()-[].?"):gsub("(.)", "%%%1") .. "])"

local function includes(str: string, substring: string, position: (string | number)?): boolean
	local strLen, invalidBytePosition = utf8.len(str)
	assert(strLen ~= nil, ("string `%s` has an invalid byte at position %s"):format(str, tostring(invalidBytePosition)))
	if strLen == 0 then
		return false
	end

	if #substring == 0 then
		return true
	end

	local startIndex = 1
	if position ~= nil then
		startIndex = tonumber(position) or 1
		if startIndex > strLen then
			return false
		end
	end

	if startIndex < 1 then
		startIndex = 1
	end

	local init = utf8.offset(str, startIndex)
	local value = substring:gsub(luaPatternCharacters, "%%%1")
	local iStart, _ = string.find(str, value, init)
	return iStart ~= nil
end

return includes
--print("Front"..autoF-1)
--print("Back"..autoR)



if autoF - 2 > autoR then
	shf = false
else
	if math.abs(orderch - 50) < speed then 
		shf = true
	else 
		if carSeat.Storage.Mode.Value ~= "Snow" then
		shf = false
		end
	end
end

if autoF - 1 > autoR and script.Parent.Storage.TransmissionType.Value == "HPattern" and currentgear.Value <= 3 then
	if speed < 20 then
		if clutch.Clutch.Value > 0.3 and clutch.Clutch.Value < 0.6 and script.Parent.Storage.Throttle.Throttle.Value > 0.2 then
			script.Parent.Functions.Clutch.Value = 0.0001
			script.Parent.Functions.Clutch.Override.Value = true script.Parent.Functions.Clutch.Freeze.Value = true
		 else script.Parent.Functions.Clutch.Override.Value = false script.Parent.Functions.Clutch.Freeze.Value = false end
	 else script.Parent.Functions.Clutch.Override.Value = false script.Parent.Functions.Clutch.Freeze.Value = false end
 else script.Parent.Functions.Clutch.Override.Value = false script.Parent.Functions.Clutch.Freeze.Value = false end
-- ================================================================================
-- LOCAL FUNCTIONS
-- ================================================================================


local function statusChanged()
	local raceStatus = RaceManager:GetRaceStatus()

	-- Hide GUI when round is in session and player is a speeder
	if raceStatus == RaceManager.Status.RoundInProgress then
		CheckpointFrame.Visible = true
	else
		CheckpointFrame.Visible = false
	end
end -- statusChanged()
--		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.Occupied.Value = true
				script.Parent.Parent.Misc.FL.Mirror.SS.Motor.DesiredAngle = 0
               script.Parent.Parent.Misc.FR.Mirror.SS.Motor.DesiredAngle = 0
				script.Parent.Parent.Body.Dash.Screen.G.Enabled = true
				script.Parent.Parent.Body.Dash.DashSc.G.Enabled = true
				script.Parent.Parent.Body.Dash.DashSc2.G.Enabled = true
				if script.Parent.L.Value == true then
					if player.Name == script.Parent.Parent.Owner.Value then
						script.Parent.L.Value = false
					else
						wait()
						script.Parent.Disabled = true
						wait()
						script.Parent.Disabled = false
					end
				end
			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.Occupied.Value = false
				script.Parent.Parent.Body.Dash.Screen.G.Enabled = false
					script.Parent.Parent.Body.Dash.DashSc.G.Enabled = false
					script.Parent.Parent.Body.Dash.DashSc2.G.Enabled = false
			
			end
		end
	end	
end)
-- Preload animations


function playAnimation(animName, transitionTime, humanoid)
	if (animName ~= currentAnim) then		 
		
		if (oldAnimTrack ~= nil) then
			oldAnimTrack:Stop()
			oldAnimTrack:Destroy()
		end

		currentAnimSpeed = 1.0
		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
--DEBUG
--local function UnderObject(pos, l)
--	l = l or 120
--	-- raycast
--	local hit, position = Workspace:FindPartOnRayWithIgnoreList(Ray.new(pos, UpVec * l), ignoreList)
--	if hit then
--		return (hit.Transparency ~= 1 and not string.find(hit.Name, "Droplet") and not string.find(hit.Name, "Extrusion")) and true or UnderObject(position + UpVec, l - (pos - position).Magnitude)
--	else
--		return false
--	end
--end
-- Implements Javascript's `Array.prototype.every` as defined below
-- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every


return function<T, U>(t: Array<T>, callback: callbackFn<T> | callbackFnWithThisArg<T, U>, thisArg: U?): boolean
	if typeof(t) ~= "table" then
		error(string.format("Array.every called on %s", typeof(t)))
	end
	if typeof(callback) ~= "function" then
		error("callback is not a function")
	end

	local len = #t
	local k = 1

	while k <= len do
		local kValue = t[k]
		local testResult

		if kValue ~= nil then
			if thisArg ~= nil then
				testResult = (callback :: callbackFnWithThisArg<T, U>)(thisArg, kValue, k, t)
			else
				testResult = (callback :: callbackFn<T>)(kValue, k, t)
			end

			if not testResult then
				return false
			end
		end
		k += 1
	end
	return true
end
--[=[
	@interface EnumItem
	.Name string
	.Value number
	.EnumType EnumList
	@within EnumList
]=]


type EnumItem = {
	Name: string,
	Value: number,
	EnumType: any,
}

local LIST_KEY = newproxy()
local NAME_KEY = newproxy()

local function CreateEnumItem(name: string, value: number, enum: any): EnumItem
	local enumItem = {
		Name = name,
		Value = value,
		EnumType = enum,
	}
	table.freeze(enumItem)
	return enumItem
end
--[=[
	@within TableUtil
	@function Copy
	@param tbl table -- Table to copy
	@param deep boolean? -- Whether or not to perform a deep copy
	@return table

	Creates a copy of the given table. By default, a shallow copy is
	performed. For deep copies, a second boolean argument must be
	passed to the function.

	:::caution No cyclical references
	Deep copies are _not_ protected against cyclical references. Passing
	a table with cyclical references _and_ the `deep` parameter set to
	`true` will result in a stack-overflow.
]=]


local function Copy<T>(t: T, deep: boolean?): T
	if not deep then
		return (table.clone(t :: any) :: any) :: T
	end
	
	local function DeepCopy(tbl: { any })
		local tCopy = table.clone(tbl)
		for k, v in tCopy do
			if type(v) == "table" then
				tCopy[k] = DeepCopy(v)
			end
		end
		return tCopy
	end
	
	return DeepCopy(t :: any) :: T
end
-- создаётся инструмент по перекрашиванию объектов


local Players = game:GetService("Players")
 
local localPlayer = Players.LocalPlayer
local backpack = localPlayer:WaitForChild("Backpack")
 
local tool = Instance.new("Tool")
tool.RequiresHandle = false
tool.CanBeDropped = false 
tool.Parent = backpack
 
tool.Equipped:Connect(function(mouse)
	mouse.Button1Down:Connect(function()
		if mouse.Target and mouse.Target.Parent then
			mouse.Target.BrickColor = BrickColor.Random()
		end
	end)
end)
--[=[
	@within TableUtil
	@function Reconcile
	@param source table
	@param template table
	@return table

	Performs a one-way sync on the `source` table against the
	`template` table. Any keys found in `template` that are
	not found in `source` will be added to `source`. This is
	useful for syncing player data against data template tables
	to ensure players have all the necessary keys, while
	maintaining existing keys that may no longer be in the
	template.

	This is a deep operation, so nested tables will also be
	properly reconciled.

	```lua
	local template = {kills = 0, deaths = 0, xp = 0}
	local data = {kills = 10, abc = 20}
	local correctedData = TableUtil.Reconcile(data, template)
	
	print(correctedData) --> {kills = 10, deaths = 0, xp = 0, abc = 30}
	```
]=]


local function Reconcile(src: Table, template: Table): Table

	assert(type(src) == "table", "First argument must be a table")
	assert(type(template) == "table", "Second argument must be a table")

	local tbl = table.clone(src)

	for k,v in pairs(template) do
		local sv = src[k]
		if sv == nil then
			if type(v) == "table" then
				tbl[k] = Copy(v, true)
			else
				tbl[k] = v
			end
		elseif type(sv) == "table" then
			if type(v) == "table" then
				tbl[k] = Reconcile(sv, v)
			else
				tbl[k] = Copy(sv, true)
			end
		end
	end

	return tbl

end
--[[
	@class Blend.story
]]



local require = require(game:GetService("ServerScriptService"):FindFirstChild("LoaderUtils", true).Parent).load(script)

local RunService = game:GetService("RunService")

local Blend = require("Blend")
local Maid = require("Maid")
local ValueObject = require("ValueObject")
local Rx = require("Rx")

return function(target)
	local maid = Maid.new()

	local percentVisible = Blend.State(0)
	local state = Blend.State("a")
	maid:GiveTask(state)

	local uiCornerValueObject = ValueObject.new()
	uiCornerValueObject.Value = Blend.New "UICorner" {
		CornerRadius = UDim.new(0, 5);
	};
	maid:GiveTask(uiCornerValueObject)

	-- Reassign to a new value
	task.delay(1, function()
		if uiCornerValueObject.Destroy then
			uiCornerValueObject.Value = Blend.New "UICorner" {
				CornerRadius = UDim.new(0, 25);
			};
		end
	end)

	maid:GiveTask((Blend.New "TextLabel" {
		Parent = target;
		Size = Blend.Computed(percentVisible, function(visible)
			return UDim2.new(0, visible*100, 0, 50);
		end);
		BackgroundTransparency = Blend.Computed(percentVisible, function(visible)
			return 1 - visible
		end);
		Position = UDim2.new(0.5, 0, 0.5, 0);
		AnchorPoint = Vector2.new(0.5, 0.5);
		Text = state;
		TextScaled = true;

		[Blend.Children] = {
			uiCornerValueObject;

			Rx.NEVER;
			Rx.EMPTY;

			{
				Blend.Single(Blend.Computed(percentVisible, function(visible)
					if visible <= 0.5 then
						return nil
					else
						return Blend.New "Frame" {
							Size = UDim2.new(0, 100, 0, 100);
							BackgroundTransparency = 0.5;
						}
					end
				end));

			};

			{
				Blend.Single(Blend.Computed(percentVisible, function(visible)
					local results = {}

					-- constructs a ton of children everytime this changes
					for x=0, visible*100, 10 do
						table.insert(results, Blend.New "Frame" {
							Size = UDim2.new(0, 8, 0, 8);
							Position = UDim2.new(0, x, 0.9, 0);
							AnchorPoint = Vector2.new(0.5, 0.5);
							BorderSizePixel = 0;
							BackgroundColor3 = Color3.new(x/100, 0.5, 0.5);

							[Blend.Children] = {
								Blend.New "UICorner" {
									CornerRadius = UDim.new(0.5, 5);
								};
							};
						})
					end

					return results
				end));
			};
		};
	}):Subscribe())

	local PERIOD = 5
	maid:GiveTask(RunService.RenderStepped:Connect(function()
		state.Value = tostring(os.clock())
		percentVisible.Value = (math.sin(os.clock()*math.pi*2/PERIOD) + 1)/2
	end))

	return function()
		maid:DoCleaning()
	end
end
--Precalculated paths


local t,f,n=true,false,{}
local r={
[58]={{74,73,76,72,71,61,59,41,30,56,58},t},
[49]={{74,73,76,72,71,61,59,41,39,35,34,32,31,29,28,44,45,49},t},
[16]={n,f},
[19]={{74,73,76,72,71,61,59,41,30,56,58,20,19},t},
[59]={{74,73,76,72,71,61,59},t},
[63]={{74,73,76,72,71,61,59,41,30,56,58,23,62,63},t},
[34]={{74,73,76,72,71,61,59,41,39,35,34},t},
[21]={{74,73,76,72,71,61,59,41,30,56,58,20,21},t},
[48]={{74,73,76,72,71,61,59,41,39,35,34,32,31,29,28,44,45,49,48},t},
[27]={{74,73,76,72,71,61,59,41,39,35,34,32,31,29,28,27},t},
[14]={n,f},
[31]={{74,73,76,72,71,61,59,41,39,35,34,32,31},t},
[56]={{74,73,76,72,71,61,59,41,30,56},t},
[29]={{74,73,76,72,71,61,59,41,39,35,34,32,31,29},t},
[13]={n,f},
[47]={{74,73,76,72,71,61,59,41,39,35,34,32,31,29,28,44,45,49,48,47},t},
[12]={n,f},
[45]={{74,73,76,72,71,61,59,41,39,35,34,32,31,29,28,44,45},t},
[57]={{74,73,76,72,71,61,59,41,30,56,57},t},
[36]={{74,73,76,72,71,61,59,41,39,35,37,36},t},
[25]={{74,73,76,72,71,61,59,41,39,35,34,32,31,29,28,27,26,25},t},
[71]={{74,73,76,72,71},t},
[20]={{74,73,76,72,71,61,59,41,30,56,58,20},t},
[60]={{74,73,76,72,71,61,60},t},
[8]={n,f},
[4]={n,f},
[75]={{74,73,75},t},
[22]={{74,73,76,72,71,61,59,41,30,56,58,20,21,22},t},
[74]={{74},t},
[62]={{74,73,76,72,71,61,59,41,30,56,58,23,62},t},
[1]={n,f},
[6]={n,f},
[11]={n,f},
[15]={n,f},
[37]={{74,73,76,72,71,61,59,41,39,35,37},t},
[2]={n,f},
[35]={{74,73,76,72,71,61,59,41,39,35},t},
[53]={{74,73,76,72,71,61,59,41,39,35,34,32,31,29,28,44,45,49,48,47,52,53},t},
[73]={{74,73},t},
[72]={{74,73,76,72},t},
[33]={{74,73,76,72,71,61,59,41,39,35,37,36,33},t},
[69]={{74,73,76,72,71,61,69},t},
[65]={{74,73,76,72,71,61,59,41,30,56,58,20,19,66,64,65},t},
[26]={{74,73,76,72,71,61,59,41,39,35,34,32,31,29,28,27,26},t},
[68]={{74,73,76,72,71,61,59,41,30,56,58,20,19,66,64,67,68},t},
[76]={{74,73,76},t},
[50]={{74,73,76,72,71,61,59,41,39,35,34,32,31,29,28,44,45,49,48,47,50},t},
[66]={{74,73,76,72,71,61,59,41,30,56,58,20,19,66},t},
[10]={n,f},
[24]={{74,73,76,72,71,61,59,41,39,35,34,32,31,29,28,27,26,25,24},t},
[23]={{74,73,76,72,71,61,59,41,30,56,58,23},t},
[44]={{74,73,76,72,71,61,59,41,39,35,34,32,31,29,28,44},t},
[39]={{74,73,76,72,71,61,59,41,39},t},
[32]={{74,73,76,72,71,61,59,41,39,35,34,32},t},
[3]={n,f},
[30]={{74,73,76,72,71,61,59,41,30},t},
[51]={{74,73,76,72,71,61,59,41,39,35,34,32,31,29,28,44,45,49,48,47,50,51},t},
[18]={n,f},
[67]={{74,73,76,72,71,61,59,41,30,56,58,20,19,66,64,67},t},
[61]={{74,73,76,72,71,61},t},
[55]={{74,73,76,72,71,61,59,41,39,35,34,32,31,29,28,44,45,49,48,47,52,53,54,55},t},
[46]={{74,73,76,72,71,61,59,41,39,35,34,32,31,29,28,44,45,49,48,47,46},t},
[42]={{74,73,76,72,71,61,59,41,39,40,38,42},t},
[40]={{74,73,76,72,71,61,59,41,39,40},t},
[52]={{74,73,76,72,71,61,59,41,39,35,34,32,31,29,28,44,45,49,48,47,52},t},
[54]={{74,73,76,72,71,61,59,41,39,35,34,32,31,29,28,44,45,49,48,47,52,53,54},t},
[43]={n,f},
[7]={n,f},
[9]={n,f},
[41]={{74,73,76,72,71,61,59,41},t},
[17]={n,f},
[38]={{74,73,76,72,71,61,59,41,39,40,38},t},
[28]={{74,73,76,72,71,61,59,41,39,35,34,32,31,29,28},t},
[5]={n,f},
[64]={{74,73,76,72,71,61,59,41,30,56,58,20,19,66,64},t},
}
return r
--[[Engine]]


	--Torque Curve
	Tune.Horsepower		= 800		--	[TORQUE CURVE VISUAL]
	Tune.IdleRPM		= 700		--		https://www.desmos.com/calculator/2uo3hqwdhf
	Tune.PeakRPM		= 6000		--		Use sliders to manipulate values
	Tune.Redline		= 6700		--		Copy and paste slider values into the respective tune values
	Tune.EqPoint		= 5500
	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		= 150		-- 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)
-- Uber l33t maths to calcluate the angle needed to throw a projectile a distance, given the altitude of the end point and the projectile's velocity


function AngleOfReach(distance, altitude, velocity)
	local theta = math.atan((velocity^2 + math.sqrt(velocity^4 -196.2*(196.2*distance^2 + 2*altitude*velocity^2)))/(196.2*distance))
	if theta ~= theta then
		theta = math.pi/4
	end
	return(theta)
end