Live a good life.
If there are gods and they are just, then 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 you will have lived a noble life that will live on in the memories of your loved ones.
(This quote is often attributed to Marcus Aurelius, however it is uncertain that it actually was him. Still, a good philosophy to live by...one does not have to believe in God to be a good person...and if God would destroy a good person just because that person doesn't worship him, who would want to worship a jerk like that?)