At max money, your script sometimes continues to weaken the server...and launch grow scripts. Problem is that this increases the security level--requiring a new weaken cycle. Starting a infinite loop of 0 money.
I added a check to my local version of the script to see if money is at or near max and if so omit grows from weaken cycles. It's incredibly crude because I don't fully understand your code, so I'd recommend you rewrite it in your own manner.
Your script assumes that ALL SPACE THAT EXISTS is open to it, so running ANY scripts on Home will completely fuck with it since it assigns Weakens there.
At max money, your script sometimes continues to weaken the server...and launch grow scripts. Problem is that this increases the security level--requiring a new weaken cycle. Starting a infinite loop of 0 money.
I added a check to my local version of the script to see if money is at or near max and if so omit grows from weaken cycles. It's incredibly crude because I don't fully understand your code, so I'd recommend you rewrite it in your own manner.