It is impossible for the Gov't to "run out of money" when they use a fiat currency system. They can create an endless supply of it. The real problem is not if they run out of money, but rather that they create too much of it. Or even under different economic conditions, that they don't create enough if it. Too much currency can lead to distortions in prices, malinvestment and asset bubbles that cause great volatility in the economic cycles as we have seen numerous times already. And if things were too get severe enough where the system is flooded with cash and there was no corresponding economic growth, the value of the currency would continue to decline. Meaning in theory, there could be unlimited amounts of currency that have no value. But since we don't use a monetary standard like the gold standard anymore, the gov't can never run out if money.
Please note that I am not an advocate of the fiat currency system, or the gold standard. I think there is a solution in between such as a currency linked to a basket of diverse commodities, which could impose fiscal discipline on the gov't while still remaining far more flexible than the gold standard.