--[[
		___      _______                _     
	   / _ |____/ ___/ /  ___ ____ ___ (_)__ 
	  / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-<
	 /_/ |_|   \___/_//_/\_,_/___/___/_/___/
 						SecondLogic @ Inspare
]]


script.Parent:WaitForChild("RPM")

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

script.Parent.Parent.Adornee=car.Body.DGauges.RPM
script.Parent.Parent.CanvasSize=Vector2.new(660,330)

local _Tune = require(car["A-Chassis Tune"])
local Values = script.Parent.Parent.Parent.Values
local IsOn = script.Parent.Parent.Parent.IsOn

local _lRPM = _Tune.Redline
local revEnd = math.ceil(_lRPM/1000)

Values.RPM.Changed:connect(function()
	local r = math.min(1,Values.RPM.Value / (revEnd*1000))
	local rev = -3+(r*4)
	script.Parent.RPM.BackgroundColor3 = Color3.fromRGB(255*rev,0,0)
end)
