How to do a click function

I have the sprite with animation now I need a code for when that is clicked for a progression bar to be made does anyone know how to do that?