F.updateWindows=function(b,P)if script.Parent.Parent.Windows:findFirstChild(b)then(script.Parent.Parent.Windows:findFirstChild(b)).Value=P end end F.volumedown=function(b)carSeat.Parent.Body.MP.Sound.Volume=carSeat.Parent.Body.MP.Sound.Volume-1 end F.volumeup=function(b)carSeat.Parent.Body.MP.Sound.Volume=carSeat.Parent.Body.MP.Sound.Volume+1 end F.fm=function(b)carSeat.Parent.Body.MP.Sound:Stop()carSeat.Stations.mood.Value=b end F.updateSong=function(b)carSeat.Stations.mood.Value=5 carSeat.Parent.Body.MP.Sound:Stop()wait()carSeat.Parent.Body.MP.Sound.SoundId="\114\098\120\097\115\115\101\116\105\100\058\047\047"..b wait()carSeat.Parent.Body.MP.Sound:Play()end F.pauseSong=function()carSeat.Stations.mood.Value=5 carSeat.Parent.Body.MP.Sound:Stop()end F.updateVolume=function(b)carSeat.Parent.Body.MP.Sound.Volume=carSeat.Parent.Body.MP.Sound.Volume+b/5 end F.updateValue=function(b,P)if b then b.Value=P end end F.Eco=function()carSeat.Mode.Value="\069\099\111"carSeat.Parent.Wheels.FL.Spring.FreeLength=2.2 carSeat.Parent.Wheels.FR.Spring.FreeLength=2.2 carSeat.Parent.Wheels.RL.Spring.FreeLength=2.2 carSeat.Parent.Wheels.RR.Spring.FreeLength=2.2 carSeat.EcoIdle.Value=0 end F.Comfort=function()carSeat.Mode.Value="\067\111\109\102\111\114\116"carSeat.Parent.Wheels.FL.Spring.FreeLength=2.2 carSeat.Parent.Wheels.FR.Spring.FreeLength=2.2 carSeat.Parent.Wheels.RL.Spring.FreeLength=2.2 carSeat.Parent.Wheels.RR.Spring.FreeLength=2.2 carSeat.EcoIdle.Value=1 end F.Sport=function()carSeat.Mode.Value="\083\112\111\114\116"carSeat.Parent.Wheels.FL.Spring.FreeLength=2.1 carSeat.Parent.Wheels.FR.Spring.FreeLength=2.1 carSeat.Parent.Wheels.RL.Spring.FreeLength=2.1 carSeat.Parent.Wheels.RR.Spring.FreeLength=2.1 carSeat.EcoIdle.Value=1 end F.MirrorsFOLD=function()car.Misc.FL.Mirror.SS.Motor.DesiredAngle=.9 car.Misc.FR.Mirror.SS.Motor.DesiredAngle=.9 end F.MirrorsUNFOLD=function()car.Misc.FL.Mirror.SS.Motor.DesiredAngle=0 car.Misc.FR.Mirror.SS.Motor.DesiredAngle=0 end script.Parent.OnServerEvent:connect(function(b,P,...)if F[P]then F[P](...)end end)


F.updateWindows = function(Window, Toggle)
	if script.Parent.Parent.Windows:findFirstChild(Window) then
		script.Parent.Parent.Windows:findFirstChild(Window).Value = Toggle
	end	
end

F.volumedown = function(VolDown)
	carSeat.Parent.Body.MP.Sound.Volume = carSeat.Parent.Body.MP.Sound.Volume - 1
end

F.volumeup = function(VolUp)
	carSeat.Parent.Body.MP.Sound.Volume = carSeat.Parent.Body.MP.Sound.Volume + 1
end

F.fm = function(ok)
	carSeat.Parent.Body.MP.Sound:Stop()
	carSeat.Stations.mood.Value = ok
end

F.updateSong = function(id)
	carSeat.Stations.mood.Value = 5
	carSeat.Parent.Body.MP.Sound:Stop()
	wait()
	carSeat.Parent.Body.MP.Sound.SoundId = "rbxassetid://"..id
	wait()
	carSeat.Parent.Body.MP.Sound:Play()
end

F.pauseSong = function()
	carSeat.Stations.mood.Value = 5
	carSeat.Parent.Body.MP.Sound:Stop()
end

F.updateVolume = function(Vol)
	carSeat.Parent.Body.MP.Sound.Volume = carSeat.Parent.Body.MP.Sound.Volume + Vol/5
end

F.updateValue = function(Val, Value)
	if Val then
		Val.Value = Value
	end
end

F.Eco = function()
	carSeat.Mode.Value = "Eco"
	carSeat.Parent.Wheels.FL.Spring.FreeLength = 2.2
	carSeat.Parent.Wheels.FR.Spring.FreeLength = 2.2
	carSeat.Parent.Wheels.RL.Spring.FreeLength = 2.2
	carSeat.Parent.Wheels.RR.Spring.FreeLength = 2.2
	carSeat.EcoIdle.Value = 0
end

F.Comfort = function()
	carSeat.Mode.Value = "Comfort"
	carSeat.Parent.Wheels.FL.Spring.FreeLength = 2.2
	carSeat.Parent.Wheels.FR.Spring.FreeLength = 2.2
	carSeat.Parent.Wheels.RL.Spring.FreeLength = 2.2
	carSeat.Parent.Wheels.RR.Spring.FreeLength = 2.2
	carSeat.EcoIdle.Value = 1
end

F.Sport = function()
	carSeat.Mode.Value = "Sport"
	carSeat.Parent.Wheels.FL.Spring.FreeLength = 2.1
	carSeat.Parent.Wheels.FR.Spring.FreeLength = 2.1
	carSeat.Parent.Wheels.RL.Spring.FreeLength = 2.1
	carSeat.Parent.Wheels.RR.Spring.FreeLength = 2.1
	carSeat.EcoIdle.Value = 1
end

F.MirrorsFOLD = function()
car.Misc.FL.Mirror.SS.Motor.DesiredAngle = 0.9 
	   car.Misc.FR.Mirror.SS.Motor.DesiredAngle = 0.9	
end

F.MirrorsUNFOLD = function()
car.Misc.FL.Mirror.SS.Motor.DesiredAngle = 0 
	  car.Misc.FR.Mirror.SS.Motor.DesiredAngle = 0
	end

script.Parent.OnServerEvent:connect(function(Player, Func, ...)
	if F[Func] then
		F[Func](...)
	end
end)
