--SynapseX Decompiler


script.Parent:WaitForChild("Car")
script.Parent:WaitForChild("IsOn")
script.Parent:WaitForChild("ControlsOpen")
script.Parent:WaitForChild("Values")
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local UserInputService = game:GetService("UserInputService")
local car = script.Parent.Car.Value
local _Tune = require(car["A-Chassis Tune"])
local hpScaling = _Tune.WeightScaling * 10
local FBrakeForce = _Tune.FBrakeForce
local RBrakeForce = _Tune.RBrakeForce
local PBrakeForce = _Tune.PBrakeForce
if not workspace:PGSIsEnabled() then
	hpScaling = _Tune.LegacyScaling * 10
	FBrakeForce = _Tune.FLgcyBForce
	RBrakeForce = _Tune.RLgcyBForce
	PBrakeForce = _Tune.LgcyPBForce
end
local _IsOn = _Tune.AutoStart
if _Tune.AutoStart then
	script.Parent.IsOn.Value = true
end
local _GSteerT = 0
local _GSteerC = 0
local _GThrot = 0
local _GBrake = 0
local _ClutchOn = true
local _ClPressing = false
local _RPM = 0
local _HP = 0
local _OutTorque = 0
local _CGear = 0
local _TMode = _Tune.TransModes[1]
local _MSteer = false
local _SteerL = false
local _SteerR = false
local _PBrake = false
local _TCS = _Tune.TCSEnabled
local _TCSActive = false
local _ABS = _Tune.ABSEnabled
local _ABSActive = false
local FlipWait = tick()
local FlipDB = false
local _InControls = false
car.DriveSeat.ChildRemoved:connect(function(child)
	if child.Name == "SeatWeld" and child:IsA("Weld") then
		script.Parent:Destroy()
	end
end)
local _CTRL = _Tune.Controls
local Controls = Instance.new("Folder", script.Parent)
Controls.Name = "Controls"
for i, v in pairs(_CTRL) do
	do
		local a = Instance.new("StringValue", Controls)
		a.Name = i
		a.Value = v.Name
		a.Changed:connect(function()
			if i == "MouseThrottle" or i == "MouseBrake" then
				if a.Value == "MouseButton1" or a.Value == "MouseButton2" then
					_CTRL[i] = Enum.UserInputType[a.Value]
				else
					_CTRL[i] = Enum.KeyCode[a.Value]
				end
			else
				_CTRL[i] = Enum.KeyCode[a.Value]
			end
		end)
	end
end
local _PPH = _Tune.Peripherals
for i, v in pairs(_PPH) do
	do
		local a = Instance.new("IntValue", Controls)
		a.Name = i
		a.Value = v
		a.Changed:connect(function()
			a.Value = math.min(100, math.max(0, a.Value))
			_PPH[i] = a.Value
		end)
	end
end
function DealWithInput(input, IsRobloxFunction)
