The variable is 1 in one object, in the other object it is 0. In the object that collides it is 1 so I do not understand why the collision does not occur.
If you remove the "x > 500" and "x < 0" conditions then it works correctly.
The problem is the block "OR", there is a failed there.
If you disable the "x > 500" and "x < 0" conditions, it will not work, you need to delete them.