You can create a setter function for the variable. In that function, you can pre-process the value before accepting, rejecting, or changing it.
So, for example, in your global script (Globals.gd in this case):
# set up the var and define a setter function
var pos_var = 1 setget pos_var_set
# here, only accept the value if it's positive. Otherwise, set it to zero.
func pos_var_set(new_val):
if new_val > 0:
pos_var = new_val
else:
pos_var = 0
Now, from some other script, you won’t be able to set the var to a negative value