Programming help newb counter

I wanted to change the code from 10,000 to 0 decremented by 50 per second of the push button being held.

Then, the state change detection example is not a good starting point. You are NOT concerned about doing something only when the switch BECOMES pressed or BECOMES released. You want to do something when the switch IS pressed. So, write the appropriate code.

You will need to know when the switch BECOMES pressed, so you know when the one second mark passes, when the two second mark passes, etc.

Not all of your code will be in the block where you detect that the switch has become pressed.

You are NOT interested in the number of times the switch becomes pressed, so quit counting them.