IF and ELSE statements being executed

After the button is pressed, it has to wait it is released! Only if it has been released a new pressure can be taken in account.
It's also important a debouncing: you can achieve it simply by a 100nF (100.000pF) capacitor between input and ground, or paralleled to the button.