if carSeat.Throttle==1 then if autoF-1>autoR or clutch.Clutch.Value~=1 then TCount=1 else if TCount>=1 then TCount=1 else if speed>50 then TCount=TCount+.167 elseif speed<20 then TCount=TCount+.3334 else TCount=TCount+.02 end end end else if TCount<=0 then TCount=0 else TCount=0 end end if currentgear.Value~=1 then tlR=0 if clutch.Clutch.Value~=1 then if throttle.Value~=0 then if engine.Value>redline.Value*(1-clutch.Clutch.Value)then engine.Value=engine.Value-300 else engine.Value=engine.Value+((600+decay.Value)*throttle.Value-decay.Value)end else engine.Value=engine.Value-decay.Value end rpm.Value=engine.Value else engine.Value=rpm.Value end else tlR=tlR+.05 if tlR>20 then script.Parent.Functions.Engine.Value=false first=.333 end engine.Value=engine.Value+((600+decay.Value)*first-decay.Value)if engine.Value>idle.Value*2 then first=0 end end drive="\120"


if carSeat.Throttle == 1 then
if autoF - 1 > autoR or clutch.Clutch.Value ~= 1 then
	TCount = 1 
	else
	if TCount >= 1 then
		TCount = 1
	else
		if speed > 50 then
		TCount = TCount + 0.167
		
		elseif speed < 20 then
		TCount = TCount + 0.3334
		
			else
		TCount = TCount + 0.02
		end
	end
	
	end
else
	if TCount <= 0 then
		TCount = 0
	else
		TCount = 0
	end
end

if currentgear.Value ~= 1 then tlR = 0
	if clutch.Clutch.Value ~= 1 then
		if throttle.Value ~= 0 then
			if engine.Value > redline.Value * (1-clutch.Clutch.Value) then --------------?? WE DONT NEED A 'FOR' IN THE CLUTCH CODE
				engine.Value = engine.Value - 300
				else
				engine.Value = engine.Value + (((600+decay.Value) * throttle.Value) - decay.Value) 
			end else engine.Value = engine.Value - decay.Value
		end
		rpm.Value = engine.Value
	else
		engine.Value = rpm.Value
	end
else
	tlR = tlR + 0.05
	if tlR > 20 then
		script.Parent.Functions.Engine.Value = false
		first = 0.333
	end
	engine.Value = engine.Value + (((600+decay.Value) * first) - decay.Value)
	if engine.Value > idle.Value*2 then
		first = 0 
	end
		--engine.Value = (idle.Value-decay.Value)
		
end

drive = "x"
