function UserInput.init()UserInputService.InputBegan:Connect(function(R,j)if j then return end local h=getActionFromInput(R)if h=="\070\111\114\119\097\114\100\115"then throttle=1 elseif h=="\066\097\099\107\119\097\114\100\115"then throttle=-1 elseif h=="\076\101\102\116"then steer=-1 elseif h=="\082\105\103\104\116"then steer=1 elseif h=="\066\111\111\115\116"then if FlagEnableBoosts then ClientVehicleBoosts.requestBoost()end end end)UserInputService.InputEnded:Connect(function(R,j)if j then return end local h=getActionFromInput(R)if h=="\070\111\114\119\097\114\100\115"or h=="\066\097\099\107\119\097\114\100\115"then throttle=isActionHeld("\070\111\114\119\097\114\100\115")and 1 or isActionHeld("\066\097\099\107\119\097\114\100\115")and-1 or 0 elseif h=="\076\101\102\116"or h=="\082\105\103\104\116"then steer=isActionHeld("\082\105\103\104\116")and 1 or isActionHeld("\076\101\102\116")and-1 or 0 end end)end
--[[
    Listens for user input
]]
function UserInput.init()
	UserInputService.InputBegan:Connect(function(inputObject, gameProcessedEvent)
		if gameProcessedEvent then
			return
		end

		local action = getActionFromInput(inputObject)
		if action == "Forwards" then
			throttle = 1
		elseif action == "Backwards" then
			throttle = -1
		elseif action == "Left" then
			steer = -1
		elseif action == "Right" then
			steer = 1
		elseif action == "Boost" then
			if FlagEnableBoosts then
				ClientVehicleBoosts.requestBoost()
			end
		end
	end)

	UserInputService.InputEnded:Connect(function(inputObject, gameProcessedEvent)
		if gameProcessedEvent then
			return
		end

		local action = getActionFromInput(inputObject)

		if action == "Forwards" or action == "Backwards" then
			throttle = isActionHeld("Forwards") and 1 or isActionHeld("Backwards") and -1 or 0
		elseif action == "Left" or action == "Right" then
			steer = isActionHeld("Right") and 1 or isActionHeld("Left") and -1 or 0
		end
	end)
end
