Using Bool to preform a series of tasks after button is pressed once

The values are being read constantly so z is usually one

You don't HAVE a variable called z.