Az-Zumar 39:35
لِيُكَفِّرَ ٱللَّهُ عَنْهُمْ أَسْوَأَ ٱلَّذِى عَمِلُوا۟ وَيَجْزِيَهُمْ أَجْرَهُم بِأَحْسَنِ ٱلَّذِى كَانُوا۟ يَعْمَلُونَ
Liyukaffira Allahu AAanhum aswaa allatheeAAamiloo wayajziyahum ajrahum bi-ahsani allathee kanooyaAAmaloon
That Allāh may remove from them the worst of what they did and reward them their due for the best of what they used to do.
so that Allah wipes out from them the worst deeds they did, and gives their reward to them for the best of what they used to do.