--	if math.abs(g) > 0 then
--		
--	end

end

F.pbrake = function(x)
	if x then carSeat.PBt:Play()
	else carSeat.PBf:Play()
	end
end

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


F.FMSwitch = function(FM)
	if carSeat.Stations.mood.Value == 5 then
		carSeat.Parent.Body.MP.Sound:Stop()
		carSeat.Stations.mood.Value = 2
		scg.Radio.Song.Text = "PRESET 2"
	elseif carSeat.Stations.mood.Value == 2 then
		carSeat.Parent.Body.MP.Sound:Stop()
		carSeat.Stations.mood.Value = 3
		scg.Radio.Song.Text = "PRESET 3"
	elseif carSeat.Stations.mood.Value == 3 then
		carSeat.Parent.Body.MP.Sound:Stop()
		carSeat.Stations.mood.Value = 4
		scg.Radio.Song.Text = "PRESET 4"
	elseif carSeat.Stations.mood.Value == 4 then
		carSeat.Parent.Body.MP.Sound:Stop()
		carSeat.Stations.mood.Value = 1
		scg.Radio.Song.Text = "PRESET 1"
	elseif carSeat.Stations.mood.Value == 1 then
		carSeat.Parent.Body.MP.Sound:Stop()
		carSeat.Stations.mood.Value = 5
		scg.Radio.Song.Text = ""
	end
end

F.volumech = function(v)
	carSeat.Parent.Body.MP.Sound.Volume = v
	scg.Radio.Volume.Text = carSeat.Parent.Body.MP.Sound.Volume
end

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

F.pauseSong = function()
	carSeat.Stations.mood.Value = 5
	carSeat.Parent.Body.MP.Sound:Stop()
	scg.Radio.Song.Text = "OFF"
end

F.pitc = function(v)
	carSeat.Parent.Body.MP.Sound.Pitch = v
end

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