You go to the ATM and pull out $100 — but it doesn't stop there; it just keeps spitting out bills until finally you've got more than $30,000. Sounds like a dream, huh? Well, it happened in Maine to one very, very lucky homeless man.

Now, the man, whose name hasn't been released, was already on South Portland police's radar as he was caught sleeping next to a TD ATM at about 1 a.m. When police arrived, they just told him to move it along. (Via TD Bank)

But police said just a few hours later, "We got another call that he was back there and taking an unusually long time at the ATM by a woman who was trying to use it. She thought it seemed suspicious." (Via Bangor Daily News)

When they arrived on the scene, the man was shoveling cash into a shopping bag.

The man was using his own bank card to withdraw cash using the "cash advance" feature. He reportedly made more than 50 withdrawls before police intervened. The ATM should have cut him off but apparently didn't because of a code error. (Via WGME)

The money was returned to the bank, and there will reportedly be no charges filed against the man.