Able to Jump either on Ground or Climbing

I am attempting to allow my player to be able to Jump either while they are on the ground or while they are on the ladder.

I have tried to use both the | operator and the ^ operator.
When I do it with either operator I disable jumping entirely.

I have two questions:

  1. What is exactly the difference between | and ^ ?
  2. What would be the easiest way to alter this current code to allow that function for the player?

My script is otherwise exactly as Ricks in the lecture.