Works-based salvation is a belief as old as sin. Mankind’s first stratagem to make things right for themselves was to sew leaves together to hide the nakedness sin had exposed. This is the works of the flesh endeavoring to produce spiritual respectability. Their next act was to hide from God when He came to meet them so He wouldn’t discover their nakedness. Note the order, sin consciousness led to acts of self-righteousness that allayed the shame between husband and wife, but gave no relief in the presence of God.
We haven’t changed in millennia. Our fallen nature is compelled to make itself respectable. Our Sunday-go-to-meeting clothes put us on a comfortable level playing field with each other in the sanctuary. But absent the cleansing blood of the Lamb, our souls will find themselves sinfully naked when God shows up and we hide behind the wild trees of our hearts. Works pale in the light of God’s holiness. Even so, redemption from the world’s perspective, be it in films, novels, or office conversations, takes the form of “good works.” Rest assure, works will be judged by God, but they don’t bring salvation. They inform on the level of punishment.
11 And I saw a great white throne, and him that sat on it, from whose face the earth and the heaven fled away; and there was found no place for them.
12 And I saw the dead, small and great, stand before God; and the books were opened: and another book was opened, which is the book of life: and the dead were judged out of those things which were written in the books, according to their works.
13 And the sea gave up the dead which were in it; and death and hell delivered up the dead which were in them: and they were judged every man according to their works.
14 And death and hell were cast into the lake of fire. This is the second death.
15 And whosoever was not found written in the book of life was cast into the lake of fire. KJV
Viewed in context with the prophetic chronology of the full counsel of God, the resurrection in verses 12 and 13 can be none other than the resurrection of the unjust. The rapture of the church is a resurrection of its dead members along with the transformation of its living ones. That it involves both living and dead is what makes it different and a mystery. Regardless of where one puts it on the eschatological timeline, the truth remains that as an event, it is more than just a resurrection. Revelation 20:4-5 tell of the souls under the altar coming back to life and reigning with Christ as a result of the first resurrection. This brings us to the verses above. The only resurrection left is the resurrection of the damned.
In the Father’s kingdom, the punishment always fits the crime. The works of man are judged. They are wanting for salvation, but sufficient for death. Being listed in the book of life is the only way anyone avoids being cast into the lake of fire. I believe its burn on the resurrected flesh of unjustified man will be proportional to his wickedness.
Once all evil is bound in the lake of fire, the Father will wipe the entire creation clean and usher in the new heaven and earth.
2 Peter 3:7, 10-13
7 But the heavens and the earth, which are now, by the same word are kept in store, reserved unto fire against the day of judgment and perdition [Greek apoleia, destruction or ruin] of ungodly men.
10 But the day of the Lord will come as a thief in the night; in the which the heavens shall pass away with a great noise, and the elements shall melt with fervent heat, the earth also and the works that are therein shall be burned up.
11 Seeing then that all these things shall be dissolved, what manner of persons ought ye to be in all holy conversation and godliness,
12 Looking for and hasting unto the coming of the day of God, wherein the heavens being on fire shall be dissolved, and the elements shall melt with fervent heat?
13 Nevertheless we, according to his promise, look for new heavens and a new earth, wherein dwelleth righteousness. KJV
The “day of judgment and perdition of ungodly men” is the resurrection of the unjust. Peter says that the elements will melt. The Greek text uses a word which refers to the basic components of matter. Since the bombings of Hiroshima and Nagasaki, the world has known what happens when an atom is ripped apart. Peter describes a universal nuclear meltdown. Once the old is burned away, God will bring forth the new heavens and earth.
1 And I saw a new heaven and a new earth: for the first heaven and the first earth were passed away; and there was no more sea.
2 And I John saw the holy city, new Jerusalem, coming down from God out of heaven, prepared as a bride adorned for her husband.
3 And I heard a great voice out of heaven saying, Behold, the tabernacle of God is with men, and he will dwell with them, and they shall be his people, and God himself shall be with them, and be their God.
4 And God shall wipe away all tears from their eyes; and there shall be no more death, neither sorrow, nor crying, neither shall there be any more pain: for the former things are passed away. KJV
New Jerusalem is “our house which is from heaven” Paul speaks of in 1 Corinthians 5:2. Its establishment on earth is part of what makes not only the earth new, but heaven as well. A real separation between the two exists in our day. But in that day, God will dwell on earth bringing heaven with Him. Living with Him in that endless final age is the everlasting life that Christ bought for us on the cross.
2 Peter 3:17-18
17 You therefore, beloved, knowing this beforehand, take care that you are not carried away with the error of lawless people and lose your own stability.
18 But grow in the grace and knowledge of our Lord and Savior Jesus Christ. To him be the glory both now and to the day of eternity. Amen. ESV
 See Gen. 3:6-11.
 The archangel Michael told Daniel that some would awake “to shame and everlasting contempt” (Dan. 12:1-2). Jesus called the resurrection of the just the “resurrection of life” and the resurrection of the unjust the “resurrection of damnation” (John 5:29). Paul referred to the resurrection of the just and the unjust in Acts 24:15.
 1 Cor. 15:51-53; 1 Thess. 4:15-17.