A random stranger who walked into a Texas ice cream shop is being called a legend after walking out of the store Saturday night with a 7-foot-long receipt, a bottle of water and a big smile on his face.

The man, identified as “Mr. Gary,” simply came into Sweet Sammies in Fort Worth, Texas, to buy a bottle of water.

But he decided to stick around, and one by one, as each customer entered, the man did something unexpected -- he offered to pick up their tab.

Get Breaking News Delivered to Your Inbox

“He stood here all night and bought everyone’s ice cream until we closed,” shop owner Kory Close told CBS Dallas / Fort Worth in Texas.

By the end of the night, his bill was $1,300.

“He said, ‘You know what, I’m going to pay for everybody’s food that’s in here,’” Close said.

He did just that.

For nearly three hours, Mr. Gary stood by the counter, greeting customers and offering to pay their bill. He had originally planned on giving away $100, but for some reason he just couldn’t put his wallet away.

Security footage captured the generous man in the navy and white-striped polo shirt shaking hands and exchanging hugs with both thankful customers and employees. Some even asked him for a photo.

And the act of kindness didn’t stop there.

Before leaving, Mr. Gary handed each worker a $100 bill, a welcome surprise, especially for a soon-to-be dad like manager Darell Cook.

“I’ve got a baby on the way, so might [use it] for diapers and formula.” Cook told CBS DFW..

People had no idea what inspired Mr. Gary’s good deed, but Cook says he may have a clue.

The man had parked on a nearby street, which costs a flat rate of $20 if a ticket isn’t validated. He happened to stop by the ice cream shop, asking if someone could do him a favor and validate the ticket.

“He came in here, he seemed like he was in a rush, so I just went ahead and validated it for him,” Cook said. “[That] opened him up to doing what he ended up doing.”

Mr. Gary’s sweet gesture proves “a little more gratitude for each other goes a long way,” Close said.