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

local FE = workspace.FilteringEnabled
local car = script.Parent.Car.Value
local _Tune = require(car["A-Chassis Tune"])
local on = 0

local handler = car.AC6_FE_Idle
handler:FireServer("newSound","Idle",car.DriveSeat,script.Idle.SoundId,0,script.Idle.Volume,true)
handler:FireServer("playSound","Idle")

handler:FireServer("updateSound","Idle",script.Idle.SoundId,0.5,0)	

while wait() do
	if car.DriveSeat.IsOn.Value then	
		if script.Parent.Values.RPM.Value <= 1100 then	
			if car.DriveSeat.DriveMode.Value == "Eco" then
				handler:FireServer('tween',"Idle",0)
			else
				handler:FireServer('tween',"Idle",0.5)										
			end
			--handler:FireServer('tween',"Rev",0)				
		else
			handler:FireServer('tween',"Idle",0)						
		end
	 else
		handler:FireServer('tween',"Idle",0)				
end
end
