animation

I want to know how I can do when the character jumps,
if he is jumping normal do his beginning and end, but if he is falling from a higher height do the loop



I leave you the code that I have, but I don’t know how to propose to do it.