BGの衝突判定(?)をしているようですが、 If b and ボタン定数 and 衝突判定条件 then では無く If(b and ボタン定数)&&衝突判定条件 then とした方が良きです