help with servo project !

I guess what I want, is a way to interupt the code as soon as the button is released.

What you're looking for is a "while" loop.