A homeless man in San Luis Obispo, California, has gone from living on the streets to planning a home and car purchase — thanks to a lottery scratcher and a loyal relationship with a local liquor store, the manager says.

In early April, the unnamed man bought the ticket from Sandy’s Liquor. He scratched it off, believing he’d won $100,000. But when he showed it to the store’s manager, Wilson Samaan, both men realized he actually won $1 million.

“I was so excited — even more than him,” Samaan told the Los Angeles Times in a story published April 16. “He’s a good person. He deserves every penny.”

Don’t miss

Here’s the story behind the big win, and how you can use a windfall to secure your financial stability.

A life-changing amount of money

Samaan, who’s known the man for years, didn’t just share the moment of good news with him. The manager says he personally drove the winner to the California State Lottery office in Fresno — a two-and-a-half-hour drive each way — to make sure the ticket arrived safely.

The man’s win was still being verified by officials when the story was published, according to the Times. A spokesperson noted the process can take weeks, but they did confirm to the publication a $1-million Triple Red 777 ticket was sold at Sandy’s Liquor in San Luis Obispo in April.

During the wait, the winner carefully considered his next move.

“He said he’s not going to waste the second chance he got gifted, so he’s going to buy a car and a small house,” Samaan said. “Then the rest of the money, he’s going to invest or find a business.”

Stories like this are uplifting, however, there’s a long list of lottery winners who misspend their newfound fortune. A sudden windfall can be a blessing — or a burden — depending on how it’s managed.

So, what should you do if you’re lucky enough to come into a large sum of money?

What to do if you receive a windfall

Here are some smart steps to help you avoid common mistakes and make your money last:

1. Figure out how much you’ll actually receive

Often, lotteries will offer payment in the form of a lump sum or annuity. Lump sums give you more cash upfront, but may end up being a fraction of the total amount you would get in annuities. The option you choose will likely depend on personal circumstances. Either way, you will have to pay federal (and sometimes state) taxes on your winnings. Consider hiring a financial advisor to help you understand how much you stand to gain or lose and choose your best course of action to achieve your financial goals.

Read more: Want an extra $1,300,000 when you retire? Dave Ramsey says this 7-step plan ‘works every single time’ to kill debt, get rich in America — and that ‘anyone’ can do it

2. Don’t tell everyone

It’s tempting to share good news, but it can quickly lead to unwanted attention, fraud or pressure from friends and family. Stay quiet while you get your financial ducks in order — and be careful who you tell. Distant family and old acquaintances may come back into your life hoping for a payout.

3. Heavily consider big purchases

Don’t rush to spend your newfound fortune. Give yourself time to adjust and think long-term. A “cooling off” period is often wise. If you do make a large purchase, make sure you consider the long-term costs, like home or car insurance, repairs and maintenance.

4. Build a financial team

If your windfall is significant, you may want to assemble a team of financial professionals to help guide you. This may include:

Good planners can help answer questions like, “Can I afford to stop working?” or “What’s the smartest way to give to charity or family?” If you have trouble setting boundaries, a therapist may be a good addition to your financial team.

5. Create a budget for your new life

Even if you suddenly become a millionaire, it doesn’t mean you can spend like one forever. Set aside money for necessities, emergencies and future goals. A financial planner may also be best suited to help you decide where to put the money you’re not using to good use so you can ensure your security for a long time.

What to read next

This article provides information only and should not be construed as advice. It is provided without warranty of any kind.