It's not an either or - the second (money) merely is a lot easier if the first exists. I've seen startups soon dominated by thoughts of the private jet for the executives and all thoughts dominated by money, wealth and power. Guess what suffered: Actually developing the f...ing product. Lots of internal power struggles, because fast growth leads to a lot of fancy new job titles and offices.
If money is the #1 motivating factor you'll create the company mirroring your goals. Doesn't mean you won't be successful - one of the companies I didn't mention was eventually sold for hundreds of millions (but that was down from billions of projected value earlier after they screwed up due to what I mentioned) - but you can increase your chances of success if your actual product is actually important to you, and if it solves an actual problem.
If the first, yeah, dude, you are basically toast. If the second, you may be able to rise from the dead again. It just may take a while.