switch (Switch[Client]) { // Switch is on, turn it off case 1: Switch[Client] = false; // Switch is off, turn it on case 0: Switch[Client] = true; }