"And whoever repents and does righteousness, then indeed, he turns to Allah with [proper] repentance," meaning: He accepts his repentance if he repents before death.
Surat al-Furqan (from verse 72 to verse 77).
﴿وَمَنْ تَابَ وَعَمِلَ صَالِحًا فَإِنَّهُ يَتُوب إِلَى الله متابا﴾ أَيْ: يَقْبَلُ تَوْبَتَهُ إِذَا تَابَ قبل الْمَوْت.
سُورَة الْفرْقَان من (آيَة ٧٢ آيَة ٧٧).