A few points:
(1) When entering code, please use the insert code menu item, so that it's properly formatted. You'll get less people helping if you make it hard for them to see your code properly.
(2) Your line checking for buttonState2 controls output 13, and your line checking button3 controls output12. That seems to be the opposite to what you want, so change the numbers on those lines.
(3) You've configured pins 12 and 13 to be outputs, yet you read them using digitalRead. I don't know if that is valid or not in Arduino world. It might be OK, but not all microcontrollers necessarily will report back what you expect, if you try to read an output pin. It might not be an issue, but personally I would not do this unless I was sure what the behavior was. If you're in any doubt, then simply create two variables, called (say) state12 and state13 (these are terrible names by the way, but it's the sort of convention you seem to be using, so I've stuck with it), then set your outputs either high or low at startup, as you desire, and set those state variables to match. Then, you never need to try to do a digitalRead on those outputs, you can simply check your variable state, and update that along with your digitalWrite commands.
A few points:
(1) When entering code, please use the insert code menu item, so that it's properly formatted. You'll get less people helping if you make it hard for them to see your code properly.
(2) Your line checking for buttonState2 controls output 13, and your line checking button3 controls output12. That seems to be the opposite to what you want, so change the numbers on those lines.
(3) You've configured pins 12 and 13 to be outputs, yet you read them using digitalRead. I don't know if that is valid or not in Arduino world. It might be OK, but not all microcontrollers necessarily will report back what you expect, if you try to read an output pin. It might not be an issue, but personally I would not do this unless I was sure what the behavior was. If you're in any doubt, then simply create two variables, called (say) state12 and state13 (these are terrible names by the way, but it's the sort of convention you seem to be using, so I've stuck with it), then set your outputs either high or low at startup, as you desire, and set those state variables to match. Then, you never need to try to do a digitalRead on those outputs, you can simply check your variable state, and update that along with your digitalWrite commands.