Couple of points (which may not solve your problems but may be a start):
1) Please present your code more clearly - its a pain to read code that goes sideways! Start each new command on a new line.
2)
IF dir=1 AND right_shoot = 1 THEN right_shoot=1
IF dir=0 AND left_shoot= 1 THEN left_shoot=1
These two statements seem pointless. You are giving a variable a value which it already has, ie. 1.
3)
IF xlaser=xlaser+10 AND dir=0 THEN right_shoot=1
IF xlaser=xlaser-10 AND dir=1 THEN left_shoot=1
xlaser will never be equal to xlaser+10, or xlaser-10. It will only ever be equal to xlaser. Think about it - if xlaser is, let's say 25, then your statement is saying if 25=35 then...... or if 25=15 then .....
Try sorting out those three things first, and if it still doesn't work I'll take a closer look.