[Machine] The Prophet ﷺ came to a man who asked, "O Messenger of Allah, if I do good in Islam, will I be held accountable for my actions during the time of ignorance?" The Prophet ﷺ replied, "If you do good in Islam, you will not be held accountable for your actions during the time of ignorance. However, if you do wrong in Islam, you will be held accountable for both your previous and current actions."
أَتَى النَّبِيَّ ﷺ رَجُلٌ فَقَالَ يَا رَسُولَ اللهِ إِذَا أَحْسَنْتُ فِي الْإِسْلَامِ أُؤَاخَذُ بِمَا عَمِلْتُ فِي الْجَاهِلِيَّةِ؟ فَقَالَ إِذَا أَحْسَنْتَ فِي الْإِسْلَامِ لَمْ تُؤَاخَذْ بِمَا عَمِلْتَ فِي الْجَاهِلِيَّةِ وَإِذَا أَسَأْتَ فِي الْإِسْلَامِ أُخِذْتَ بِالْأَوَّلِ وَالْآخِرِ