The righteous are righteous because they do righteousness. The unrighteous are unrighteous because they do unrighteousness
On the Day of Judgment, God will judge the thoughts and intents of our hearts.