How do i make my character lose energy when they jump?

How did you do your visuals then?