Pinkstack/roblox-luau-corpus-text huggingface dataset:
--[[
	Returns a value with Out tween direction of an Exponential tween style
	that reverses at a specified midpoint. Alpha and return value are both 0 <= x <= 1,
	and midpoint is 0 < x < 1.
--]]



local EPSILON = 0.001

local function getExponentialTweenValueWithMidpoint(alpha: number, midpoint: number)
	-- To avoid division by zero, midpoint needs to be 0 < midpoint < 1. Its purpose
	-- is to be somewhere between the 0 and 1 bounds to provide a switching point from
	-- increasing to decreasing, so logically it shouldn't be at either boundary. For this reason,
	-- we define EPSILON to define how near the bounds it can be.
	midpoint = math.clamp(midpoint, EPSILON, 1 - EPSILON)
	alpha = math.clamp(alpha, 0, 1)

	local function increasing()
		return 1 - 2 ^ (-10 * alpha / midpoint)
	end

	local function decreasing()
		return 1 - 2 ^ (10 * (alpha - 1) / (1 - midpoint))
	end
	return if alpha <= midpoint then increasing() else decreasing()
end

return getExponentialTweenValueWithMidpoint
-- FALL SERVICE --
--local DefaultGroup = fallService.new("Default", 20, 0.4, { --last argument is optional
--	["MaterialsDamage"] = {
--		["Water"] = 0, -- multiply damage by 0 if fall in water (so 0 damage)
--		["Fabric"] = 0.85, -- by default all materials have 1 multiplier
--		["Grass"] = 0.85,
--		["Sand"] = 0.75
--	}
--})
-- Check if character is there


if script.Owner.Value.Character ~= nil then
	
	-- Find knife
	local knife = nil
	if script.Owner.Value.Backpack:FindFirstChild("Knife") then
		knife = script.Owner.Value.Backpack.Knife
	elseif script.Owner.Value.Character:FindFirstChild("Knife") then
		knife = script.Owner.Value.Character.Knife
	end
	if knife ~= nil then
		
		-- Make knife reload faster
		knife.KnifeScript.KnifeThrowCooldown.Value = knife.KnifeScript.KnifeThrowCooldown.Value * COOLDOWN_CHANGE
		
	end
	
end
--local Items = {
--	["Name"] = {
--		Price = 300,
--		CurrencyType = Enum.CurrencyType.Default;
--		Decal = 123456,
--		NameInItemsFolder --[[ReplicatedStorage/Gears]] = "Gear",
--		Name --[[because tables work stupidly]] = "Gear",
--		Special = "This is what appears in the description section";
--		GamepassId = 1276132162 --Dev product ID
--	};
--	["test"] = {
--		Price = 300,
--		CurrencyType = Enum.CurrencyType.Default;
--		Decal = "http://www.roblox.com/asset/?id=9368539255",
--		NameInItemsFolder --[[ReplicatedStorage/Gears]] = "an actual house",
--		Name --[[because tables work stupidly]] = "an actual house",
--		Special = "lol";
--		GamepassId = 123456; --Not used in this case, as it's a FB item.
--	};
--}
--//R//--


if gear.Value == -1 then
if carSeat.Throttle == 1 then
	rwd.Throttle = -1
	rwd.Torque = tq/1.2
	rwd.MaxSpeed = maxspeed/10
	lwd.Throttle = -1
	lwd.Torque = ftq/1.2
	lwd.MaxSpeed = maxspeed/10
	rrwd.Throttle = -1
	rrwd.Torque = ftq/1.2
	rrwd.MaxSpeed = maxspeed/10
	
elseif carSeat.Throttle == -1 then
	rb.RB.CanCollide = true
	rb.FB.CanCollide = true
	lfb.RB.CanCollide = true
	lfb.FB.CanCollide = true
	rfb.RB.CanCollide = true
	rfb.FB.CanCollide = true
	wait(brakes)
	rb.RB.CanCollide = false
	rb.FB.CanCollide = false
	lfb.RB.CanCollide = false
	lfb.FB.CanCollide = false
	rfb.RB.CanCollide = false
	rfb.FB.CanCollide = false
	wait()
elseif carSeat.Throttle == 0 then
	rwd.Throttle = 0
	rwd.Torque = cst
	rwd.MaxSpeed = maxspeed
	lwd.Throttle = 0
	lwd.Torque = cst
	lwd.MaxSpeed = maxspeed
	rrwd.Throttle = 0
	rrwd.Torque = cst
	rrwd.MaxSpeed = maxspeed
	rb.RB.CanCollide = false
	rb.FB.CanCollide = false
	lfb.RB.CanCollide = false
	lfb.FB.CanCollide = false
	rfb.RB.CanCollide = false
	rfb.FB.CanCollide = false
	end
end
--[[
	[Horizontal and Vertical limits for head and body tracking.]
	[Setting to 0 negates tracking, setting to 1 is normal tracking, and setting to anything higher than 1 goes past real life head/body rotation capabilities.]
--]]


local HeadHorFactor = 1
local HeadVertFactor = 1
local BodyHorFactor = 1.5
local BodyVertFactor = 1.4
-- Roblox NPC sound script



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

local SOUND_DATA = {
	Climbing = {
		SoundId = "rbxasset://sounds/action_footsteps_plastic.mp3",
		Looped = true,
	},
	Died = {
		SoundId = "",
	},
	FreeFalling = {
		SoundId = "rbxasset://sounds/action_falling.mp3",
		Looped = true,
	},
	GettingUp = {
		SoundId = "rbxasset://sounds/action_get_up.mp3",
	},
	Jumping = {
		SoundId = "rbxasset://sounds/action_jump.mp3",
	},
	Landing = {
		SoundId = "rbxasset://sounds/action_jump_land.mp3",
	},
	Running = {
		SoundId = "rbxasset://sounds/action_footsteps_plastic.mp3",
		Looped = true,
		Pitch = 1.85,
	},
	Splash = {
		SoundId = "rbxasset://sounds/impact_water.mp3",
	},
	Swimming = {
		SoundId = "rbxasset://sounds/action_swim.mp3",
		Looped = true,
		Pitch = 1.6,
	},
}
--[=[
	@function toSet
	@within Array

	@param array {T} -- The array to convert to a set.
	@return Set<T> -- The set.

	Converts an array to a set.

	```lua
	local array = { "a", "b", "b", "c", "d" }

	local set = ToSet(array) -- { a = true, b = true, c = true, d = true }
	```
]=]


local function toSet<T>(array: { T }): _T.Set<T>
	local set = {}

	for _, value in ipairs(array) do
		set[value] = true
	end

	return set
end

return toSet
--		carSeat.Parent.Body.Dash.Screen.G.Radio.Song.Text = "PRESET 1"
--		carSeat.Parent.Body.Dash.Screen.G.Radio.Title.Text = ""


	elseif carSeat.Stations.mood.Value == 1 then
		carSeat.Parent.Body.MP.Sound:Stop()
		carSeat.Stations.mood.Value = 5
-- a: amplitud
-- p: period


local function outElastic(t, b, c, d, a, p)
  if t == 0 then return b end

  t = t / d

  if t == 1 then return b + c end

  if not p then p = d * 0.3 end

  local s

  if not a or a < abs(c) then
    a = c
    s = p / 4
  else
    s = p / (2 * pi) * asin(c/a)
  end

  return a * pow(2, -10 * t) * sin((t * d - s) * (2 * pi) / p) + c + b
end
--l.WordWrap = word_wrap



closing=false
close.MouseButton1Click:connect(function()
	--close.Visible = false
	
	hidef()
	closing=true
	--cutoff.Visible = false

end)

function showf()
	script.scrollunroll.Pitch = math.random(900,1100)/1000
	script.scrollunroll:Play()
	close.Visible = true
	
	
	cutoff.Visible = false
	cutoff.Position = UDim2.new(0.5,-300,0,-300)
	cutoff.Visible = true
	cutoff:TweenPosition(
		originalpos
		, "In", "Quad", .5, true, nil
	)
	wait(.51)
	cutoff.Size = UDim2.new(0,600,0,cutoff_start)
	--cutoff.Visible = true
	cutoff:TweenSize(
		UDim2.new(0,600,0,cutoff_end)
		, "Out", "Quad", .8, true, nil
	)		
end

function hidef()
	if closing then return end
	script.scrollroll.Pitch = math.random(900,1100)/1000
	script.scrollroll:Play()
	cutoff:TweenSize(
		UDim2.new(0,600,0,cutoff_start)
		, "Out", "Quad", .3, true, nil
	)
	wait(.31)
	cutoff:TweenPosition(
		UDim2.new(0.5,-300,0,-300)
		, "Out", "Quad", .3, true, nil
	)
	wait(.31)
	cutoff.Visible = false
	--cutoff.Position = originalpos
	g:Destroy()
end
----------------------------------------------------------------------------------------------------
-------------------=[ PROJETIL ]=-------------------------------------------------------------------
----------------------------------------------------------------------------------------------------


	,Distance = 4000
	,BDrop = .25
	,BSpeed = 1600

	,SuppressMaxDistance = 25	--- Studs
	,SuppressTime = 10			--- Seconds

	,BulletWhiz = false
	,BWEmitter = 25
	,BWMaxDistance = 50
	
	,BulletFlare = false
	,BulletFlareColor = Color3.fromRGB(255,255,255)

	,Tracer = false
	,TracerColor = Color3.fromRGB(255,255,255)
	,TracerLightEmission = 1
	,TracerLightInfluence = 0
	,TracerLifeTime = .2
	,TracerWidth = .1
	,RandomTracer = false
	,TracerEveryXShots = 5
	,TracerChance = 100
	
	,BulletLight = false
	,BulletLightBrightness = 1
	,BulletLightColor = Color3.fromRGB(255,255,255)
	,BulletLightRange = 10

	,ExplosiveHit = false
	,ExPressure = 500
	,ExpRadius = 25
	,DestroyJointRadiusPercent = 0	--- Between 0 & 1
	,ExplosionDamage = 100

	,LauncherDamage = 100
	,LauncherRadius = 25
	,LauncherPressure = 500
	,LauncherDestroyJointRadiusPercent = 0
-- p = period
-- a = amplitud


local function inOutElastic(t, b, c, d, a, p)
	if t == 0 then return b end

	t = t / d * 2

	if t == 2 then return b + c end

	if not p then p = d * (0.3 * 1.5) end
	if not a then a = 0 end

	local s

	if not a or a < abs(c) then
		a = c
		s = p / 4
	else
		s = p / (2 * pi) * asin(c / a)
	end

	if t < 1 then
		t = t - 1
		return -0.5 * (a * pow(2, 10 * t) * sin((t * d - s) * (2 * pi) / p)) + b
	else
		t = t - 1
		return a * pow(2, -10 * t) * sin((t * d - s) * (2 * pi) / p ) * 0.5 + c + b
	end
end
--[[
	Creates a function that invokes a callback with correct error handling and
	resolution mechanisms.
]]


local function createAdvancer(callback, resolve, reject)
	return function(...)
		local result = { wpcall(callback, ...) }
		local ok = table.remove(result, 1)

		if ok then
			resolve(unpack(result))
		else
			reject(unpack(result))
		end
	end
end

local function isEmpty(t)
	return next(t) == nil
end

local Promise = {}
Promise.__index = Promise

Promise.Status = {
	Started = "Started",
	Resolved = "Resolved",
	Rejected = "Rejected",
}
--[[
	Returns a random vector3 within a region3, that has a clear area around it of specified size. This function yields.
]]


local random = Random.new(tick())

return function(region, clearAreaSize)
	local position

	local regionPosition = region.CFrame.Position

	while not position do
		local minX, maxX =
			regionPosition.X - (region.Size.X / 2) + clearAreaSize.X,
			regionPosition.X + (region.Size.X / 2) - clearAreaSize.X
		local minY, maxY =
			regionPosition.Y - (region.Size.Y / 2) + clearAreaSize.Y,
			regionPosition.Y + (region.Size.Y / 2) - clearAreaSize.Y
		local minZ, maxZ =
			regionPosition.Z - (region.Size.Z / 2) + clearAreaSize.Z,
			regionPosition.Z + (region.Size.Z / 2) - clearAreaSize.Z

		local x, y, z = random:NextNumber(minX, maxX), random:NextNumber(minY, maxY), random:NextNumber(minZ, maxZ)

		local clearRegionMax, clearRegionMin = Vector3.new(x, y, z) + clearAreaSize, Vector3.new(x, y, z) - clearAreaSize

		local area = Region3.new(clearRegionMax, clearRegionMin)

		local partsInArea = workspace:FindPartsInRegion3(area, nil, 1)

		if #partsInArea == 0 then
			position = Vector3.new(x, y, z)
		end
		wait()
	end

	return position
end
-- See if already listed


local listed = false
for _, i in pairs(plr.PlayerGui.MainGui.RadioSettings.MainFrame.History.Container:GetChildren()) do
	if i.Name == "Entry" then
		if i.ID.Value == script.Parent.ID.Value then
			listed = true
			break
		end
	end
end
if listed then
	
	-- Gray out add button
	script.Parent.AddButton.TextColor3 = Color3.fromRGB(100, 100, 100)
	
end
--Precalculated paths


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


local tkf = Instance.new("Motor", script.Parent.Parent.Misc.TKF.SS)
tkf.MaxVelocity = 0.03
tkf.Part0 = script.Parent.TKF
tkf.Part1 = tkf.Parent

local wl = Instance.new("Motor", script.Parent.Parent.Misc.FL.Window.SS) --windows
local wr = Instance.new("Motor", script.Parent.Parent.Misc.FR.Window.SS)
local wl2 = Instance.new("Motor", script.Parent.Parent.Misc.RL.Window.SS)
local wr2 = Instance.new("Motor", script.Parent.Parent.Misc.RR.Window.SS)

wl.MaxVelocity = 0.007
wl.Part0 = script.Parent.Parent.Misc.FL.Door.WD
wl.Part1 = wl.Parent

wr.MaxVelocity = 0.007
wr.Part0 = script.Parent.Parent.Misc.FR.Door.WD
wr.Part1 = wr.Parent

wl2.MaxVelocity = 0.007
wl2.Part0 = script.Parent.Parent.Misc.RL.Door.WD
wl2.Part1 = wl2.Parent

wr2.MaxVelocity = 0.007
wr2.Part0 = script.Parent.Parent.Misc.RR.Door.WD
wr2.Part1 = wr2.Parent

local ml = Instance.new("Motor", script.Parent.Parent.Misc.FL.Mirror.SS)
ml.MaxVelocity = 0.02
ml.Part0 = script.Parent.Parent.Misc.FL.Door.M
ml.Part1 = ml.Parent

local mr = Instance.new("Motor", script.Parent.Parent.Misc.FR.Mirror.SS)
mr.MaxVelocity = 0.02
mr.Part0 = script.Parent.Parent.Misc.FR.Door.M
mr.Part1 = mr.Parent

local sr = Instance.new("Motor", script.Parent.Parent.Misc.SR.SS)
sr.MaxVelocity = 0.01
sr.Part0 = script.Parent.SR
sr.Part1 = sr.Parent

local cd = Instance.new("Motor", script.Parent.Parent.Misc.CD.SS)
cd.MaxVelocity = 0.02
cd.Part0 = script.Parent.CD
cd.Part1 = cd.Parent
-- Initially connect all coins to touch detection


for _, coin in pairs(CollectionService:GetTagged("Coin")) do
	coin.Collider.Touched:Connect(function(hit)
		local player = game:GetService("Players"):GetPlayerFromCharacter(hit.Parent)
		if player then
			--print('Coin touched by '..player.Name)
			processCoinTouch(player, coin, COIN_REGEN_DELAY)
		end
	end)
	coinAnimation(coin)
end
-- Go through each setting value


for _, i in pairs(settingVals) do
	
	-- Make sure not nil
	if i ~= nil then
		
		-- Connect changed event
		i.Changed:connect(function()
			
			-- Set border to be on if this item
			if i.Value == itemName and script.Parent.Parent.Player.Value == plr and script.Parent.ItemType.Value ~= "Emote" and itemName ~= "" then
				
				-- Turn on border
				script.Parent.GreenEdge.Visible = true
				
			else
				
				-- Check if equip nothing as toy button
				if itemName == "" and script.Parent.ItemType.Value == "Toy" then
					
					-- Check if equipped anywhere
					local equipped = false
					for _, o in pairs(settingVals) do
						if o.Value ~= "" then
							equipped = true
							break
						end
					end
					
					-- Only turn on border if nothing equipped
					if equipped then
						script.Parent.GreenEdge.Visible = false
					else
						script.Parent.GreenEdge.Visible = true
					end
					
				else
					
					-- Check if equipped anywhere
					local equipped = false
					for _, o in pairs(settingVals) do
						if o.Value == itemName then
							equipped = true
							break
						end
					end
					
					-- Set border accordingly
					if not equipped then
						script.Parent.GreenEdge.Visible = false
					else
						script.Parent.GreenEdge.Visible = true
					end
					
				end
			end
			
		end)
		
		-- Set up
		if i.Value == itemName and script.Parent.Parent.Player.Value == plr and script.Parent.ItemType.Value ~= "Emote" and (script.Parent.ItemType.Value ~= "Toy" or itemName ~= "") then
			script.Parent.GreenEdge.Visible = true
			plr.PlayerGui.MainGui.Inventory.MainFrame.Preview.Item.Value = actualItem
		end
		
	end
	
end
--function untagHumanoid(humanoid)
--	if humanoid ~= nil then
--		local tag = humanoid:findFirstChild("creator")
--		if tag ~= nil then
--			tag.Parent = nil
--		end
--	end
--end



function explode()
	local explosion = Instance.new("Explosion")
	local blastradius=4
	explosion.BlastRadius = blastradius
	explosion.BlastPressure = 0 -- 10k
	explosion.DestroyJointRadiusPercent = math.random(0.05,0.1)
	explosion.ExplosionType = 'CratersAndDebris'
	explosion.Visible = false
	explosion.Position = script.Parent.Position
	explosion.Parent = game.Workspace
	
	explosion.Hit:connect(function(hitPart, hitDistance)
		local humanoid = hitPart.Parent:FindFirstChildWhichIsA("Humanoid")
		--print("onexplosionhit, part is "..hitPart.Name)
		--if character then
		--	local myPlayer = CreatorTag.Value
		--	if myPlayer and not myPlayer.Neutral then -- Ignore friendlies caught in the blast
		--		local player = PlayersService:GetPlayerFromCharacter(character)
		--		if player and player ~= myPlayer and player.TeamColor == Rocket.BrickColor then
		--			return
		--		end
		--	end
		--end

		if humanoid and humanoid.Health > 0 and hitPart.Name==("Torso") then -- Humanoids are tagged and damaged
			local dmg=math.random(12,16)
			dmg=dmg*(hitDistance/blastradius)
			humanoid:TakeDamage(dmg)
			print("dealt "..dmg.." damage to "..hitPart.Parent.Name)
		end
	end)
end

connection = ball.Touched:connect(onTouched)
-- assume we are in the character, let's check



function sepuku()
	script.Parent = nil
end

local h = script.Parent:FindFirstChild("Humanoid")

if (h == nil) then sepuku() end

local oldSpeed = h.WalkSpeed
h.WalkSpeed = h.WalkSpeed * 1.6




local torso = script.Parent:FindFirstChild("Torso")

if (torso == nil) then sepuku() end


local head = script.Parent:FindFirstChild("Head")
if (head == nil) then head = torso end



local count = h:FindFirstChild("CoffeeCount")
if (count == nil) then
	count = Instance.new("IntValue")
	count.Name = "CoffeeCount"
	count.Value = 1
	count.Parent = h
else
	
	if (count.Value > 3) then
		if (math.random() > .5) then

			local sound = Instance.new("Sound")
			sound.SoundId = "rbxasset://sounds\\Rocket shot.wav"
			sound.Parent = head
			sound.Volume = 1
			sound:play()

			local e = Instance.new("Explosion")
			e.BlastRadius = 4
			e.Position = head.Position
			
			s:Clone().Parent = head
			e.Parent = head
			

		end
	end
	count.Value = count.Value + 1
end

wait(30)

h.WalkSpeed = oldSpeed
s:Remove()


script.Parent = nil
--[[Engine]]


	--Torque Curve
	Tune.Horsepower		= 1000		--	[TORQUE CURVE VISUAL]
	Tune.IdleRPM		= 1100		--		https://www.desmos.com/calculator/2uo3hqwdhf
	Tune.PeakRPM		= 8250		--		Use sliders to manipulate values
	Tune.Redline		= 8750		--		Copy and paste slider values into the respective tune values
	Tune.EqPoint		= 5250
	Tune.PeakSharpness	= 5.8
	Tune.CurveMult		= 0.294 
	
	--Incline Compensation
	Tune.InclineComp	= 1.5		-- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees)
	
	--Misc
	Tune.RevAccel		= 400		-- RPM acceleration when clutch is off
	Tune.RevDecay		= 300		-- RPM decay when clutch is off
	Tune.RevBounce		= 450		-- RPM kickback from redline
	Tune.IdleThrottle	= 0			-- Percent throttle at idle
	Tune.ClutchTol		= 450		-- Clutch engagement threshold (higher = faster response, lower = more stable RPM)
--Gear Ratios


Tune.FinalDrive		= 13.5			-- Gearing determines top speed and wheel torque
Tune.Ratios			= {				-- Higher ratio = more torque, Lower ratio = higher top speed
	--[[Reverse]]	1.5		,	-- Copy and paste a ratio to add a gear
	--[[Neutral]]	0			,	-- Ratios can also be deleted
	--[[ 1 ]]		1.89		,	-- Reverse, Neutral, and 1st gear are required
	--[[ 2 ]]		0.76		,
	--[[ 3 ]]		0.49        ,
	--[[ 4 ]]       0.33        ,
	--[[ 5 ]]       0.21        ,
}
Tune.FDMult			= 1.0			-- Ratio multiplier (keep this at 1 if car is not struggling with torque)
--[[
	Player methods
]]



function Waiting:playerAdded(player)
	Util.loadCharacter(player)
end

function Waiting:playerRemoving()
end

function Waiting:characterAdded(player, character)
	-- Give the player the Pistol as the default starting weapon
	ReplicatedStorage.Assets.Weapons.Pistol:Clone().Parent = player.Backpack

	-- Grant the player a force field so they cant be killed in the waiting area
	local forceField = Instance.new("ForceField")
	forceField.Name = "WaitingForceField"
	forceField.Visible = false
	forceField.Parent = character

	CollectionService:AddTag(character, "PlayerCharacter")
end

return Waiting
--create tables:


for i,part in pairs(model:GetChildren()) do
	if string.sub(part.Name, 1,1) == "a" then
		table.insert(a, 1, part)
	end
end
for i,part in pairs(model:GetChildren()) do
	if string.sub(part.Name, 1,1) == "b" then
		table.insert(b, 1, part)
	end
end

function lightOn(T)
	for i, part in pairs (T) do
		if part:FindFirstChild("SurfaceLight") then
			part.SurfaceLight.Enabled = true
		end
	    if part:FindFirstChild("SpotLight") then
			part.SpotLight.Enabled = true
		end
	end
end

function lightOff(T)
	for i, part in pairs (T) do
		if part:FindFirstChild("SurfaceLight") then
			part.SurfaceLight.Enabled = false
		end
	    if part:FindFirstChild("SpotLight") then
			part.SpotLight.Enabled = false
		end
	end
end

while true do

	lightOn(a)
	wait(0.15)

	lightOff(a)
	wait(0.04)

	lightOn(a)
	wait(0.15)

	lightOff(a)
	wait(0.1)
	
	lightOn(b)
	wait(0.15)

	lightOff(b)
	wait(0.04)
	
	lightOn(b)
	wait(0.15)

	lightOff(b)
	wait(0.1)
	
end