For those who are self-seeking and do not obey the truth, but obey unrighteousness, there will be wrath and fury.
Romans 2:8

Even surface obedience that is motivated by self-righteousness is actually disobedience because obedience starts in the heart. Works matter, good and bad, but the determining factor of your eternal fate is the righteousness in your heart.