I've never had a problem with this hanging due to excessive purchasing when the variables are set correctly.

The containers listed in the setup GUI CANNOT be the same. It will hang 100% of the time if you try to set them all to the same container.

That said, I am still in the process of re-writing this script to make it substantially more efficient.