Created a function to stop the button

I tried to stop the button simply with the .disable but didn't work. I
created a function and it worked