-- Check for user input ended events. Handles release of R1 and thumbsticks

userInputService.InputEnded:connect(function(input, processed)
	if input.UserInputType == Enum.UserInputType.Gamepad1 then
		-- Stop moving character if left thumbstick released
		if input.KeyCode == Enum.KeyCode.Thumbstick1 then
			character.Humanoid:Move(Vector3.new(0,0,0))
		end
		-- Stop moving camera if right thumbstick released
		if input.KeyCode == Enum.KeyCode.Thumbstick2 then
			deltaAngle = 0
		end
		-- Make character move at normal speed if R3 is released
		if input.KeyCode == Enum.KeyCode.ButtonL3 then
			character.Humanoid.WalkSpeed = 16
		end
	end
end)
 