For a Lua conditional statement to be truthy, the condition must evaluate to a value that is not false nor nil. The not keyword returns the boolean complement of the value that it precedes; if the value is truthy, then preceding the value with not will return false because the complement of a truthy value is a non-truthy value, or false. If the not keyword precedes a non-truthy value (false or nil), then true will be returned because it is the only truthy boolean value that exists in Lua. Note that the not keyword will always return a boolean.
not ran is interpreted the same way. Since ran refers to false, preceding it with not will return true. If ran were to refer to true, then the condition would evaluate to false because not true is equivalent to false.
So, the conditional statement in question (if intValue.Value == 0 and not ran then) will only have its body ran if those two statements evaluate to true because you're using the and keyword. Think of reading it as "if the Value property of intValue is equal to 0 and the complement of ran is equal to true then..."
2 comments
If the if statement had been and not ran = false rather then and not ran you'd be correct. Since it has no value to compare it to, it assumes you are checking if that value is there at all. Since it's technically set to false, the code counts it to nil. Therefore what the if statement is saying is "and ran = nil".
https://scriptinghelpers.org/questions/13929/what-is-an-if-not-statement#16972