Can you spot how this "perpetual motion" machine works?

Just that episode, and one other episode a few seasons later playing the same awesome character.