Well you should be using XSE because it less buggy and all the tuts here use it.
Another thing, when using the green box you need to change the var number in advance map.
Use 4051 because it has a value of 0, and the var value is also 0, so it will always work until you set a flag and such.
DO NOT SET VARIABLE 0x4051 TO SOMETHING OTHER THAN 0
The reason was not your script, but since the var number in advance map is 0000, and 0000 is offset 0x00000000 which is read protected (game crashes)