Maybe you mean a toggle button? Like press it once ->ON, press it a second time ->OFF?
Create an instance variable on the button (select type:Boolean and let's call it "state")
On the "On clicked" event of the button add an action: Button toggle state
This value will switch from 0 to 1 every time you press the button.