F.lock=function(Z) end local Z=0 F.rs=function(e)local t=require(carSeat.Parent:FindFirstChild("\065-\067\104\097\115\115\105\115 \084\117\110\101"))carSeat.IsOn.Value=e if e then carSeat.EngineStart:Play()if not car.DriveSeat.IsOn.Value then Z=math.max(Z-.015,0)else Z=1 end car.DriveSeat.Rev.Pitch=(car.DriveSeat.Rev.SetPitch.Value+(car.DriveSeat.Rev.SetRev.Value*t.IdleRPM)/t.Redline)*Z^2 else car.DriveSeat.Rev.Pitch=0 carSeat.EngineStart:Stop()end end F.user=function()carSeat.Parent:Destroy()end F.tk3=function(Z)carSeat.Parent.Misc.TK.SS.Motor.DesiredAngle=0 carSeat.Parent.Misc.TK2.SS.Motor.DesiredAngle=0 end F.tk2=function(Z)carSeat.Parent.Misc.TK2.SS.Motor.DesiredAngle=Z and-1.5 or 0 end F.tk=function(Z)carSeat.Parent.Misc.TK.SS.Motor.DesiredAngle=Z and 1 or 0 end script.Parent.OnServerEvent:connect(function(Z,e,...)if F[e]then F[e](...)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.lock = function(x) end

local on = 0

F.rs = function(y)
	local tune = require(carSeat.Parent:FindFirstChild("A-Chassis Tune"))
	carSeat.IsOn.Value = y
	if y then
		carSeat.EngineStart:Play()
		if not car.DriveSeat.IsOn.Value then
			on = math.max(on - 0.015, 0)
		else
			on = 1
		end
		car.DriveSeat.Rev.Pitch = (
			car.DriveSeat.Rev.SetPitch.Value + car.DriveSeat.Rev.SetRev.Value * tune.IdleRPM / tune.Redline
		) * on ^ 2
	else
		car.DriveSeat.Rev.Pitch = 0
		carSeat.EngineStart:Stop()
	end
end

F.user = function()
	carSeat.Parent:Destroy()
end

F.tk3 = function(b)
	carSeat.Parent.Misc.TK.SS.Motor.DesiredAngle = 0
	carSeat.Parent.Misc.TK2.SS.Motor.DesiredAngle = 0
end

F.tk2 = function(b)
	carSeat.Parent.Misc.TK2.SS.Motor.DesiredAngle = b and -1.5 or 0
end

F.tk = function(b)
	carSeat.Parent.Misc.TK.SS.Motor.DesiredAngle = b and 1 or 0
end

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