Deciding whether to invest, save or spend a windfall is a classic problem in financial planning. It's the squirrel-it-away-or-spend-it decision that you're trying to avoid. When you invest or save the money, you're looking to use it to accomplish a future financial goal. When you spend it, you're doing it to meet a current financial goal. Added to the dilemma in your situation is the credit hangover of past spending.
Differentiating between needs and wants is part of the decision process. You need a roof over your head and transportation. That doesn't necessarily translate into building a new house or buying a new truck.
Odds are you'll need access to credit to finance a home, whether it's a new construction or an existing structure. You could buy a truck for cash, but then the cash would be gone. Keeping some of the windfall in an emergency fund as savings is important as is rebuilding your credit histories.
What does the income side of the equation look like? Can you afford a car loan payment or a mortgage payment? If your credit scores won't support a car loan but you can afford the car payment, a certificate of deposit loan, where you put the money on deposit and then borrow against it, can work toward improving your credit history as long as the financial institution reports the payment history to one of the credit bureaus. It also keeps the money invested.
While getting current and staying current on your bills will improve your credit scores over time, using the money to pay off your debt doesn't clean up your past credit history because the negative information stays on your credit report for seven years.
You don't say how deep a hole you're in, but if you're talking thousands and not tens of thousands, pay off your past due debts with the windfall. If it's in the tens of thousands, you'd want to consider the statute of limitations on the debts and the possibility of declaring bankruptcy to discharge eligible debts.
A Chapter 7 bankruptcy filing stays on your credit report for 10 years. You wouldn't have to wait 10 years to have access to credit, but it would take some time to gain access to credit again. Talk with a bankruptcy attorney before pursuing that option, especially in light of the pending windfall.