OK to start out, try changing the mechanical action of your boolean switches to "Latch When Released".
That will get you started.
I would be out of character if I did not mention that the code you have provided is littered with race conditions. My head was spinning when I was trying to follow the functionality of the sub-VI.
I suggest you post a new question and include your sub-VI and ask,
"ow can convert this VI such that it no longer uses global variables?"
Sorry but I do not have the time this AM to wander into the details.
Trying to help,
Ben