“A servant may act with regard to what the people see with the actions of the people of Paradise, but in reality he is from the people of the Fire; and he may act with regard to what the people see with the actions of the people of the Fire, when he is actually from the people of Paradise. And indeed, actions are in accordance with their conclusions.”
So a person should not allow himself to be fooled by his own deeds, even if he is the most righteous of the righteous people. Rather, he should fear that he may have an evil end (conclusion). And judgment is not passed upon anyone that he is from the people of the Fire based upon his actions because the person does not know what he will be given as is concluding deeds. And this is clarified by ahadeeth of the Prophet sallAllaahu
alayhi wa sallam, from a hadeeth of Ibn Masood (radiyAllaahu
anh, that the ProphetsallAllaahualayhi wa sallam said),
إن أحدكم يجمع خلقه في بطن أمه أربعين يوماً نطفةً، ثم يكون علقة مثل ذلك، ثم يكون مضغةً مثل ذلك، ثم يرسل إليه الملك، فينفخ فيه الروح، ويؤمر بأربع كلمات: بكتب رزقه، وأجله، وعمله، وشقي أو سعيد. وإن أحدكم ليعمل بعمل أهل الجنة حتى ما يكون بينه وبينها إلا ذراع، فيسبق عليه الكتاب، فيعمل بعمل أهل النار فيدخلها، وإن أحدكم ليعمل بعلم أهل النار حتى ما يكون بينه وبينها إلا ذراع، فيعمل بعمل أهل الجنة فيدخلها
“The creation of each one of you is brought together in his mother’s womb for forty days as a drop of fluid; then he becomes a clot for a similar period; then a piece of flesh for a similar period; and then the angel is sent to him and the soul is breathed into him. And he (the angel) is commanded to write four things: to write his provision and his life span and his actions and whether he would be a wretched person (a person of the Hellfire) or a fortunate person (a person of Paradise). And one of you performs the actions of the people of Paradise until there is nothing between him and it except a cubit and then the writing overcomes him and he acts with the actions of the people of the Hellfire and so he enters it. And one of you may act with the actions of the people of the Fire until there is nothing between him and it except for a cubit (a forearm’s span) and then he acts with the actions of the people of Paradise, and so he enters it.” 
So, therefore, a person fears having an evil end (conclusion). And judgment of having an evil conclusion is not passed upon someone since the person does not know the conclusion that will be given to him, because tawbah (repentance) wipes away whatever came before it.
Say to the unbelievers, “If they desist (from their unbelief), then whatever came before will be forgiven for them.” (Sooratul-Anfaal (8), aayah 38)
So, actions are in accordance with their conclusions (that which is final from them). However, from the subtle kindness of Allaah, the Mighty and Majestic, towards His servants, is that whoever lives upon good, then He gives him a good conclusion; and whoever lives upon evil, then He gives him an evil conclusion. So therefore, a person should act and apply the necessary means and should have good thoughts concerning Allaah, the Mighty and Majestic.
And some people say, “I will repent before I die.” Then we say to him, “And do you know when you are going to die?” It is possible that you could die in a sudden moment such that you are not able to repent; and also, you do not know whether your repentance will be acceptable or not because repentance has conditions.
 Hadeeth reported by Al-Bukhaaree (no. 3208) and by Muslim (no. 2643).
 Translator’s Side Point: Shaykh Al-Albaanee (rahimahullaah) said in his notes to At-Tahaawiyyah with regard to this point: “This phrase is part of a hadeeth of Sahl ibn Sa
ad as-Saaidee, reported by Ahmad and Al-Bukhaaree.” He mentions that he has verified it in his checking of the book As-Sunnah of Ibn Abee
Aasim. The wording of this hadeeth in Bukhaaree (no. 6493) is part of a longer hadeeth; and the relevant wording here is that the Prophet sallAllaahualayhi wa sallam said,
إِنَّ الْعَبْدَ لَيَعْمَلُ فِيمَا يَرَى النَّاسُ عَمَلَ أَهْل الْجَنَّةِ، وَإِنَّهُ لَمِنْ أَهْلِ النَّارِ، وَيَعْمَلُ فِيمَا يَرَى النَّاسُ عَمَلَ أَهْل النَّارِ وَهْوَ مِنْ أَهْلِ الْجَنَّةِ، وَإِنَّمَا الأَعْمَالُ بِخَوَاتِيمِهَا
leeqaat Al-Mukhtasarahalaa Matn Al-`Aqeedah At–Tahaawiyyah By Shaykh Saalih Ibn Fawzaan al-Fawzaan hafizahullaah
Translated by: Aboo Talhah Daawood Burbank, rahimahullaah