Nowhere in Scripture does it say we are intrinsically righteous. In fact, it says that God is righteous and it is His righteousness which works good in us. As He wills.
"For it is God which worketh in you both to will and to do of his good pleasure." -- Philippians 2:13
Nowhere did I say our righteousness was based on ourselves without God.
The fact of the matter remains that it is whether we cooperate with God that determines our righteousness. He guides us, He is our helper. He works within us both the will and desire to do good. But in the end, it is US who is judged based on whether we do this good or not.
Regards