I tip is to add a function where you can decide true or false (1 or 0 in this case) if you have a high pickup radius like in the WD script, saves more time for those with alot.
I just have to run forward and I have picked up exactly every stack of gold.