The Messenger of Allah ﷺ said, "A man may work for a long time with the deeds of the people of Paradise, then his deeds are sealed with the deeds of the people of the Fire. And a man may work for a long time with the deeds of the people of the Fire, then his deeds are sealed with the deeds of the people of Paradise."
أن رسول الله ﷺ قال: إن الرجل ليعمل الزمن الطويل بعمل أهل الجنة، ثم يختم له عمله بعمل أهل النار. وإن الرجل ليعمل الزمن الطويل بعمل أهل النار، ثم يختم له عمله بعمل أهل الجنة.
Muslim narrated it in the Chapter on Predestination (2651) from Qutayba bin Saeed, who said, Abdul-Aziz (meaning bin Muhammad) narrated to us, from Ala, from his father, from Abu Hurairah, and he mentioned it.As for what has been narrated as a raised hadith, "A man may indeed act, or he said, act, according to the deeds of the people of Hellfire for seventy years, then his end is sealed with the deeds of the people of Paradise, and a person may act for seventy years according to the deeds of the people of Paradise, then his end is sealed with the deeds of the people of Hellfire," this is daif.Bazzar narrated it, Kashf Astar (2158), and Tabarani in Mujam al-Awsat (2448), and Abdullah bin Wahb in [his book on] Predestination (48), all of them through the route of Abdullah bin Umar, from Khubayb bin Abdul-Rahman, from Hafs bin Asim, from Abu Hurairah, and he mentioned it.Abdullah bin Umar, that is, [the son of] Umar bin Hafs bin Asim bin Umar bin Khattab, the Madinan, the scholars are unanimous in declaring him daif.As for Haythami, he said in Majma (2177), "Tabarani narrated it in Awsat, and its narrators are the narrators of the sahih collections." That is because Muslim narrated from Abdullah bin Umar bin Hafs.