I'm pretty sure that this is why Christ said : "I never knew you, depart from Me". Not because they thought they were saved but because they thought that what they "DID" was good enough.
Matthew 7:21-23 New King James Version (NKJV)
21 “Not everyone who says to Me, ‘Lord, Lord,’ shall enter the kingdom of heaven, but he who does the will of My Father in heaven. 22 Many will say to Me in that day, ‘Lord, Lord, have we not prophesied in Your name, cast out demons in Your name, and done many wonders in Your name?’ 23 And then I will declare to them, ‘I never knew you; depart from Me, you who practice lawlessness!’
All their claims are what they "DID".
It's possible "He never knew them" could be for both the reasons you mentioned, but at any rate, I agree, those that think they were good enough to get to heaven, got it wrong
My point, in spite of the many accusations some of us strive to be "good enough" so we can be saved, we aren't doing that, and we know that can't save us. But to some, the bible is very clear, the lack of obedience/living in sin will cost us our salvation.
We gain salvation through the blood of Christ yet can lose it by acting like the devil.
I'll post this scripture again because it makes the point so clear to those who think that even though we cannot earn salvation, we can lose it, and there is a clear difference between earning salvation and being obedient. One would have to cover their eyes to miss what the scripture below is saying.
On righteousness, you are also correct, though no one is truly righteous, were are expected to be righteous as much as can be expected for a human. Some say we don't need to be righteous at all because of what Christs said ("None are truly good") but that isn't what he meant. All he was saying is you people don't need to ever get the idea you are good in the true sense of the word, but if we were not expected to be righteous as we can be, the following would not read as it does, expecting us to be righteous.
1 Corinthians 6:9-11 ESV /
Or do you not know that the unrighteous will not inherit the kingdom of God? Do not be deceived: neither the sexually immoral, nor idolaters, nor adulterers, nor men who practice homosexuality, nor thieves, nor the greedy, nor drunkards, nor revilers, nor swindlers will inherit the kingdom of God. And such were some of you. But you were washed, you were sanctified, you were justified in the name of the Lord Jesus Christ and by the Spirit of our God.
1 John 3:4-9 ESV /
Everyone who makes a practice of sinning also practices lawlessness; sin is lawlessness. You know that he appeared to take away sins, and in him there is no sin. No one who abides in him keeps on sinning; no one who keeps on sinning has either seen him or known him. Little children, let no one deceive you. Whoever practices righteousness is righteous, as he is righteous. Whoever makes a practice of sinning is of the devil, for the devil has been sinning from the beginning. The reason the Son of God appeared was to destroy the works of the devil. ...
One thing that will practically give one chills it the fact both those sets of scriptures warn us not to be deceived, the very reason these threads not only keep popping up, but go on and on trying to get those who are deceived to see the light. It's as if God knew ahead of time exactly what would happen today with the easy salvation and all. God loves us enough to warn us, and he warns us because he means business, and as I see it, those verses shout "This is serious business!" and that he will do everything he says he will if we don't comply. And what's worse, God will feel awful about having to keep his word in that regard
.