--TUNING--

tq = 60
ftq = 0
cst = 0.25
maxspeed = 550
brakes = 0.08 --(0.1 - 1)

while wait() do
	

speed = carSeat.Velocity.Magnitude
rs = ((carSeat.Parent.Parent.Wheels.RL.Wheel.RotVelocity.Magnitude + carSeat.Parent.Parent.Wheels.RR.Wheel.RotVelocity.Magnitude)/2)/(2/carSeat.Parent.Parent.Wheels.RL.Wheel.Size.Y)

if script.Parent.TC.Value == true then
if rs > (3+speed) then
	script.Parent.HUB.TCi.BorderSizePixel = 3
script.Parent.TC.On.Value = true
else
	script.Parent.HUB.TCi.BorderSizePixel = 0
script.Parent.TC.On.Value = false
end
end

if script.Parent.Gear.Value == 1 then
	script.Parent.HUB.Gear.Text = "D"
	
elseif script.Parent.Gear.Value == 0 then
	script.Parent.HUB.Gear.Text = "N"
	
elseif script.Parent.Gear.Value == -1 then
	script.Parent.HUB.Gear.Text = "R"
end