local s=game.Players.LocalPlayer:GetMouse()local U=script.Parent.Car.Value local p=U:WaitForChild("\080\101\100\097\108\115\070\069")script.Parent.Values.Throttle.Changed:connect(function()local s=script.Parent.Values.Throttle.Value^1*math.rad(32)p:FireServer("\080\101\100\097\108\085\112\100\097\116\101","\071\097\115",s)end)script.Parent.Values.Brake.Changed:connect(function()local s=script.Parent.Values.Brake.Value^1*math.rad(26)p:FireServer("\080\101\100\097\108\085\112\100\097\116\101","\066\114\097\107\101",s)end)script.Parent.Values.Gear.Changed:connect(function()p:FireServer("\080\101\100\097\108\085\112\100\097\116\101","\067\108\117\116\099\104",.55)end)script.Parent.Values.PBrake.Changed:connect(function()if script.Parent.Values.PBrake.Value==true then p:FireServer("\080\066\114\097\107\101")end end)script.Parent.Values.Gear.Changed:connect(function()if script.Parent.Values.Gear.Changed then p:FireServer("\080\101\100\097\108")wait(.15)p:FireServer("\083\104\105\102\116")end end)s.KeyDown:connect(function(s)if script.Parent.Values.MouseSteerOn.Value==false and s=="\119"then p:FireServer("\080\101\100\097\108")end end)s.KeyDown:connect(function(s)if script.Parent.Values.MouseSteerOn.Value==false and s=="\115"then p:FireServer("\080\101\100\097\108")end end)s.Button1Down:connect(function()if script.Parent.Values.MouseSteerOn.Value==true then p:FireServer("\080\101\100\097\108")end end)s.Button2Down:connect(function()if script.Parent.Values.MouseSteerOn.Value==true then p:FireServer("\080\101\100\097\108")end end)
--mayo's pedal script
local mouse = game.Players.LocalPlayer:GetMouse()
local car = script.Parent.Car.Value
local handler = car:WaitForChild("PedalsFE")

script.Parent.Values.Throttle.Changed:connect(function()
	local gas = script.Parent.Values.Throttle.Value ^ 1 * math.rad(32)
	handler:FireServer("PedalUpdate", "Gas", gas)
end)

script.Parent.Values.Brake.Changed:connect(function()
	local bp = script.Parent.Values.Brake.Value ^ 1 * math.rad(26)
	handler:FireServer("PedalUpdate", "Brake", bp)
end)

script.Parent.Values.Gear.Changed:connect(function()
	handler:FireServer("PedalUpdate", "Clutch", 0.55)
end)

script.Parent.Values.PBrake.Changed:connect(function()
	if script.Parent.Values.PBrake.Value == true then
		handler:FireServer("PBrake")
	end
end)

script.Parent.Values.Gear.Changed:connect(function()
	if script.Parent.Values.Gear.Changed then
		handler:FireServer("Pedal")
		wait(0.15)
		handler:FireServer("Shift")
	end
end)

mouse.KeyDown:connect(function(key)
	if script.Parent.Values.MouseSteerOn.Value == false and key == "w" then
		handler:FireServer("Pedal")
	end
end)

mouse.KeyDown:connect(function(key)
	if script.Parent.Values.MouseSteerOn.Value == false and key == "s" then
		handler:FireServer("Pedal")
	end
end)

mouse.Button1Down:connect(function()
	if script.Parent.Values.MouseSteerOn.Value == true then
		handler:FireServer("Pedal")
	end
end)

mouse.Button2Down:connect(function()
	if script.Parent.Values.MouseSteerOn.Value == true then
		handler:FireServer("Pedal")
	end
end)
