@name Bank Keypad Handler
@inputs GroupA GroupB GroupC GroupD
@outputs A B C D
if (!first()) {
    if (~GroupA & GroupA) {hint("Group A opened",3) A=!A}
    if (~GroupB & GroupB) {hint("Group B opened",3) B=!B}
    if (~GroupC & GroupC) {hint("Group C opened",3) C=!C}
    if (~GroupD & GroupD) {hint("Group D opened",3) D=!D}
} else {A=0 B=0 C=0 D=0}
