Hey buddy, found a bit of a bug in this if you are making something with 3 (maybe even 2) bars and tell it to withdraw 27 bars. If the number of bars in your bank isn't divisible by 3 (i.e. You have one left) it will continuously try and withdraw and deposit that one bar.
Additionally, when smelting bronze the script just stopped when I had 12 copper and 9 tin left in the bank rather than smelting them. Maybe a smelt max option would help this?
Otherwise, nicely done dude