Live a good life. If there are gods and they are just, they will not care how devout you have been, but will welcome you based on the virtues you have lived by. If there are gods, but unjust, then you should not want to worship them. If there are no gods, then you will be gone, but will have lived a noble life that will live on in the memories of your loved ones.Well, it's better than Pascal's wager, because it is based on values and virtues, not belief, but it is still somehow unsatisfactory. I do not exercise virtue for any hope of reward (whether in the form of being welcomed by gods, or being remembered by loved ones) but because it is the right thing to do. OK so I gain some satisfaction from doing the right thing, so perhaps it's not entirely altruistic, but I'm still uncomfortable with Aurelius' wager.
-- Marcus Aurelius (121-180)
I thoroughly approve of "If there are gods, but unjust, then you should not want to worship them" — quite right.
Addendum: Richard Carrier wipes the floor with Pascal's Wager (and by extension, Aurelius' wager).