Yea, the script is executed twice, once when you press the space bar, and once again when you release it.
So, on the first (positive) pulse, all statements are executed. On the second (negative) pulse, only the “own.Prop = 0” is executed, because “if spacebar.isPositive()” returns false on the negative pulse.
I don’t know why you need to set “own.Prop” to zero in the script. Properties have a default value of 0 as it is. So, if the default setting is your only issue, just remove “own.Prop = 0”, and it should all be fine.
PS: If you want to distinguish yourself as a programmer, do it through structure, not syntax.