Click the green flag to start with $10,000, then you can either play one week at a time (buying one $2 ticket per week) or just keep playing until you run out of money.
This is a simulator for the Powerball, using the ticket prices, odds, and payouts from the Wikipedia page (https://en.wikipedia.org/wiki/Powerball). For the sake of simplicity I generate the tickets randomly without the PowerPlay option, and one ticket is bought per week. I also couldn't simulate the jackpot accurately, so I used the average payout from the Wikipedia page (though it's exceedingly unlikely anyone will actually win it). Moneybag image from https://commons.wikimedia.org/wiki/File:Emojione_1F4B0.svg by the Emojione project, licensed under CC BY-SA 4.0.