Sahih Muslim 179: Sincerity of Intention and Purity of Purpose
It is narrated from Hazrat Ibn Abbas (ra) that the Messenger of Allah (saw), among the things he (saw) related from his Lord, the Blessed and Exalted, said: “Allah the Exalted has written down good deeds and evil deeds, and then He has explained them clearly. So whoever intends a good deed but does not act upon it, Allah writes it down with Himself as one complete good deed. And if he intends it and then (also) does it, Allah, the Mighty and Glorious, writes it down with Himself as from ten up to seven hundred times, and even many times more. But if he intends an evil deed and does not act upon it, Allah writes it down with Himself as one complete good deed; and if he intends it and (also) does it, then Allah writes it down as only one evil deed.”
AI-translated by Islam-Today