F.updateWindows=function(M,n)if script.Parent.Parent.Windows:findFirstChild(M)then(script.Parent.Parent.Windows:findFirstChild(M)).Value=n end end F.volumedown=function(M)carSeat.Parent.Body.MP.Sound.Volume=carSeat.Parent.Body.MP.Sound.Volume-1 end F.volumeup=function(M)carSeat.Parent.Body.MP.Sound.Volume=carSeat.Parent.Body.MP.Sound.Volume+1 end F.fm=function(M)carSeat.Parent.Body.MP.Sound:Stop()carSeat.Stations.mood.Value=M end F.updateSong=function(M)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"..M 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(M)carSeat.Parent.Body.MP.Sound.Volume=carSeat.Parent.Body.MP.Sound.Volume+M/5 end F.updateValue=function(M,n)if M then M.Value=n end end F.FEInfo=function()carSeat.Parent.Body.Dash.Screen.G.Enabled=true wait(.1)carSeat.Parent.Body.Dash.Screen.G.FE.Visible=true end F.delete=function(M)(workspace[M]:FindFirstChildOfClass("\072\117\109\097\110\111\105\100")).Jump=true wait(1)carSeat.Parent:Destroy()end F.PM=function(M,n)carSeat.Mode.Value=M carSeat.PMult.Value=n end F.reverse=function(M)carSeat.Parent.Misc.TK.RV.Material=M and"\078\101\111\110"or"\083\109\111\111\116\104\080\108\097\115\116\105\099"end F.Dyn=function(M)carSeat.Parent.Wheels.FL.Spring.FreeLength=M carSeat.Parent.Wheels.FR.Spring.FreeLength=M carSeat.Parent.Wheels.RL.Spring.FreeLength=M carSeat.Parent.Wheels.RR.Spring.FreeLength=M end script.Parent.OnServerEvent:connect(function(M,n,...)if F[n]then F[n](...)end end)
--F.updateSound = function(Sound, Pitch, Volume)
--	if Sound then
--		if Pitch then
--			Sound.Pitch = Pitch
--		end
--		if Volume then
--			Sound.Volume = Volume
--		end
--	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.FEInfo = function()
	carSeat.Parent.Body.Dash.Screen.G.Enabled = true
	wait(0.1)
	carSeat.Parent.Body.Dash.Screen.G.FE.Visible = true
end

F.delete = function(plr)
	workspace[plr]:FindFirstChildOfClass("Humanoid").Jump = true
	wait(1)
	carSeat.Parent:Destroy()
end

F.PM = function(m, p)
	carSeat.Mode.Value = m
	carSeat.PMult.Value = p
end

F.reverse = function(yes)
	carSeat.Parent.Misc.TK.RV.Material = yes and "Neon" or "SmoothPlastic"
end

F.Dyn = function(h)
	carSeat.Parent.Wheels.FL.Spring.FreeLength = h
	carSeat.Parent.Wheels.FR.Spring.FreeLength = h
	carSeat.Parent.Wheels.RL.Spring.FreeLength = h
	carSeat.Parent.Wheels.RR.Spring.FreeLength = h
end

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