--Gamepad support

userInputService.InputChanged:connect(function(inputObject, gameProcessedEvent)
	--if not gameProcessedEvent then
		if inputObject.KeyCode == Enum.KeyCode.Thumbstick1 then
			if inputObject.Position.magnitude >= gamepadDeadzone then
				movement = Vector2.new(movement.X, inputObject.Position.Y)
			else
				movement = Vector2.new(movement.X, 0)
			end
		elseif inputObject.KeyCode == Enum.KeyCode.Thumbstick2 then
			if inputObject.Position.magnitude >= gamepadDeadzone then
				movement = Vector2.new(inputObject.Position.X, movement.Y)
			else
				movement = Vector2.new(0, movement.Y)
			end
		end
	--end
end)
