When I started the script, it instantly ran to the empty sack and the script basically broke instantly because it simply spam-clicked the empty sack and never did anything else. I turned it off, moved away from the center of the mine, started it again. It worked normally and got an inventory of pay-dirt, cleaned it, banked the ores, and then ran back to the empty sack and continued to spam click it.... I had the script running for over 6 hours while sleeping, suddenly it's messed up this morning so not really sure what's going on. No errors shown, either.
http://gyazo.com/462663a4ec706349ef56955958983392