I need help with an animation

I am trying to make an animation so when the character hits a spring it does a back flip( btw my game is block hop advanced so please check it out)