function UserInput.init()UserInputService.InputBegan:Connect(function(B,K)if K then return end local o=getActionFromInput(B)if o=="\070\111\114\119\097\114\100\115"then throttle=1 elseif o=="\066\097\099\107\119\097\114\100\115"then throttle=-1 elseif o=="\076\101\102\116"then steer=-1 elseif o=="\082\105\103\104\116"then steer=1 elseif o=="\066\111\111\115\116"then if FlagEnableBoosts then ClientVehicleBoosts.requestBoost()end end end)UserInputService.InputEnded:Connect(function(B,K)if K then return end local o=getActionFromInput(B)if o=="\070\111\114\119\097\114\100\115"or o=="\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 o=="\076\101\102\116"or o=="\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

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
