script.Parent:WaitForChild("\071\101\097\114")script.Parent:WaitForChild("\083\112\101\101\100")script.Parent:WaitForChild("\078\101\101\100\108\101")local g=game.Players.LocalPlayer local r=g:GetMouse()local J=script.Parent.Parent.Car.Value J.DriveSeat.HeadsUpDisplay=false local Q=require(J["\065-\067\104\097\115\115\105\115 \084\117\110\101"])local O=Q.PeakRPM local p=Q.Redline local H=1 local d=math.ceil(p/1000)script.Parent.Parent.Values.Gear.Changed:connect(function()local g=script.Parent.Parent.Values.Gear.Value if g==0 then g="\060\105\062 \060\098\062\078\060\047\098\062 \060\047\105\062"elseif g==-1 then g="\060\105\062 \060\098\062\082\060\047\098\062 \060\047\105\062"end script.Parent.Gear.Text="\060\105\062 \060\098\062"..(g.."\060\047\098\062 \060\047\105\062")script.Parent.Gear.Font=Enum.Font.Oswald end)script.Parent.Parent.Values.RPM.Changed:connect(function()script.Parent.Needle.Rotation=240*math.min(1,script.Parent.Parent.Values.RPM.Value/(d*1000))end)script.Parent.Parent.Values.Velocity.Changed:connect(function(g)script.Parent.Speed.Text="\060\105\062"..(math.floor(UNITS[H].scaling*script.Parent.Parent.Values.Velocity.Value.Magnitude).."\060\047\105\062")end)wait(.1)local D=RedlineRPM-100 script.Parent.Parent.Values.RPM.Changed:connect(function()local g=script.Parent.Parent.Values.RPM.Value if g<=RedlineRPM then script.Parent.Gear.TextColor3=Color3.fromRGB(24,255,145)script.Parent.Center.ImageColor3=Color3.fromRGB(24,255,145)elseif g>=D then script.Parent.Gear.TextColor3=Color3.fromRGB(234,31,84)script.Parent.Center.ImageColor3=Color3.fromRGB(234,31,84)end end)local V=script.Parent.Parent.Values local b=script.Parent V.TCS.Changed:connect(function()if Q.TCSEnabled then if V.TCS.Value then b.TCS.ImageColor3=Color3.fromRGB(234,31,84)if V.TCSActive.Value then wait()else wait()b.TCS.ImageColor3=Color3.fromRGB(78,78,78)end else b.TCS.Visible=true b.TCS.ImageColor3=Color3.fromRGB(234,31,84)end else b.TCS.ImageColor3=Color3.fromRGB(78,78,78)end end)V.TCSActive.Changed:connect(function()if Q.TCSEnabled then if V.TCSActive.Value and V.TCS.Value then wait()elseif not V.TCS.Value then wait()b.TCS.Visible=true else wait()b.TCS.ImageColor3=Color3.fromRGB(78,78,78)end else b.TCS.ImageColor3=Color3.fromRGB(78,78,78)end end)b.TCS.Changed:connect(function()if Q.TCSEnabled then if V.TCSActive.Value and V.TCS.Value then wait()elseif not V.TCS.Value then wait()b.TCS.Visible=true end else if b.TCS.Visible then b.TCS.ImageColor3=Color3.fromRGB(78,78,78)end end end)V.ABS.Changed:connect(function()if Q.ABSEnabled then if V.ABS.Value then b.ABS.ImageColor3=Color3.fromRGB(234,31,84)if V.ABSActive.Value then wait()b.ABS.Visible=not b.ABS.Visible else wait()b.ABS.ImageColor3=Color3.fromRGB(78,78,78)end else b.ABS.Visible=true b.ABS.ImageColor3=Color3.fromRGB(234,31,84)end else b.ABS.ImageColor3=Color3.fromRGB(78,78,78)end end)V.ABSActive.Changed:connect(function()if Q.ABSEnabled then if V.ABSActive.Value and V.ABS.Value then wait()elseif not V.ABS.Value then wait()b.ABS.Visible=true else wait()b.ABS.ImageColor3=Color3.fromRGB(78,78,78)end else b.ABS.ImageColor3=Color3.fromRGB(78,78,78)end end)b.ABS.Changed:connect(function()if Q.ABSEnabled then if V.ABSActive.Value and V.ABS.Value then wait()elseif not V.ABS.Value then wait()b.ABS.Visible=true end else if b.ABS.Visible then b.ABS.ImageColor3=Color3.fromRGB(78,78,78)end end end)b.PBrake.Visible=V.PBrake.Value function PBrake()b.PBrake.Visible=V.PBrake.Value end V.PBrake.Changed:connect(PBrake)


script.Parent:WaitForChild("Gear")
script.Parent:WaitForChild("Speed")
script.Parent:WaitForChild("Needle")

local player=game.Players.LocalPlayer
local mouse=player:GetMouse()

local car = script.Parent.Parent.Car.Value
car.DriveSeat.HeadsUpDisplay = false

local _Tune = require(car["A-Chassis Tune"])

local _pRPM = _Tune.PeakRPM
local _lRPM = _Tune.Redline

local currentUnits = 1
local revEnd = math.ceil(_lRPM/1000)

script.Parent.Parent.Values.Gear.Changed:connect(function()
	local gearText = script.Parent.Parent.Values.Gear.Value
	if gearText == 0 then 
		gearText = "<i> <b>" .. "N" .. "</b> </i>"

	elseif gearText == -1 then gearText = "<i> <b>" .. "R" .. "</b> </i>"
	end
	script.Parent.Gear.Text = "<i> <b>" .. gearText .. "</b> </i>"
	script.Parent.Gear.Font = Enum.Font.Oswald
end)

script.Parent.Parent.Values.RPM.Changed:connect(function()
	script.Parent.Needle.Rotation = 240 * math.min(1,script.Parent.Parent.Values.RPM.Value / (revEnd*1000))
end)

script.Parent.Parent.Values.Velocity.Changed:connect(function(property)
	script.Parent.Speed.Text = "<i>" .. math.floor(UNITS[currentUnits].scaling*script.Parent.Parent.Values.Velocity.Value.Magnitude) .. "</i>"
end)

wait(.1)

local RPMOFF = RedlineRPM - 100

script.Parent.Parent.Values.RPM.Changed:connect(function()
	local Roundspeed = script.Parent.Parent.Values.RPM.Value

	if Roundspeed <= RedlineRPM then 
		script.Parent.Gear.TextColor3 = Color3.fromRGB(24, 255, 145)
		script.Parent.Center.ImageColor3 = Color3.fromRGB(24, 255, 145)


	elseif Roundspeed >= RPMOFF then 
		script.Parent.Gear.TextColor3 = Color3.fromRGB(234, 31, 84)
		script.Parent.Center.ImageColor3 = Color3.fromRGB(234, 31, 84)

	end 

end)

local values = script.Parent.Parent.Values
local gauges = script.Parent

values.TCS.Changed:connect(function()
	if _Tune.TCSEnabled then
		if values.TCS.Value then
			gauges.TCS.ImageColor3 = Color3.fromRGB(234, 31, 84)

			if values.TCSActive.Value then
				wait()
				--gauges.TCS.Visible = not gauges.TCS.Visible
			else
				wait()
				gauges.TCS.ImageColor3 = Color3.fromRGB(78, 78, 78)
			end
		else
			gauges.TCS.Visible = true
			gauges.TCS.ImageColor3 = Color3.fromRGB(234, 31, 84)

		end
	else
		gauges.TCS.ImageColor3 = Color3.fromRGB(78, 78, 78)
	end
end)

values.TCSActive.Changed:connect(function()
	if _Tune.TCSEnabled then
		if values.TCSActive.Value and values.TCS.Value then
			wait()
			
		elseif not values.TCS.Value then
			wait()
			gauges.TCS.Visible = true
		else
			wait()
			gauges.TCS.ImageColor3 = Color3.fromRGB(78, 78, 78)
		end
	else
		gauges.TCS.ImageColor3 = Color3.fromRGB(78, 78, 78)
	end
end)

gauges.TCS.Changed:connect(function()
	if _Tune.TCSEnabled then
		if values.TCSActive.Value and values.TCS.Value then
			wait()
			
		elseif not values.TCS.Value then
			wait()
			gauges.TCS.Visible = true
		end
	else
		if gauges.TCS.Visible then
			gauges.TCS.ImageColor3 = Color3.fromRGB(78, 78, 78)
		end
	end
end)

values.ABS.Changed:connect(function()
	if _Tune.ABSEnabled then
		if values.ABS.Value then
			gauges.ABS.ImageColor3 = Color3.fromRGB(234, 31, 84)

			if values.ABSActive.Value then
				wait()
				gauges.ABS.Visible = not gauges.ABS.Visible
			else
				wait()
				gauges.ABS.ImageColor3 = Color3.fromRGB(78, 78, 78)
			end
		else
			gauges.ABS.Visible = true
			gauges.ABS.ImageColor3 = Color3.fromRGB(234, 31, 84)

		end
	else
		gauges.ABS.ImageColor3 = Color3.fromRGB(78, 78, 78)
	end
end)

values.ABSActive.Changed:connect(function()
	if _Tune.ABSEnabled then
		if values.ABSActive.Value and values.ABS.Value then
			wait()
			
		elseif not values.ABS.Value then
			wait()
			gauges.ABS.Visible = true
		else
			wait()
			gauges.ABS.ImageColor3 = Color3.fromRGB(78, 78, 78)
		end
	else
		gauges.ABS.ImageColor3 = Color3.fromRGB(78, 78, 78)
	end
end)

gauges.ABS.Changed:connect(function()
	if _Tune.ABSEnabled then
		if values.ABSActive.Value and values.ABS.Value then
			wait()
			
		elseif not values.ABS.Value then
			wait()
			gauges.ABS.Visible = true
		end
	else
		if gauges.ABS.Visible then
			gauges.ABS.ImageColor3 = Color3.fromRGB(78, 78, 78)
		end
	end
end)

gauges.PBrake.Visible = values.PBrake.Value

function PBrake()
	gauges.PBrake.Visible = values.PBrake.Value
end

values.PBrake.Changed:connect(PBrake)

