(59) باب إِذَا هَمَّ الْعَبْدُ بِحَسَنَةٍ كُتِبَتْ وَإِذَا هَمَّ بِسَيِّئَةٍ لَمْ تُكْتَبْ
It is narrated on the authority of Abu Huraira that the Messenger of Allah (ﷺ) observed:
He who intended to do good, but did not do it, one good was recorded for him, and he who intended to do good and also did it, ten to seven hundred good deeds were recorded for him. And he who intended evil, but did not commit it, no entry was made against his name, but if he committed that, it was recorded.
Reference: Sahih Muslim 130
In-book reference: Book 1, Hadith 244
USC-MSA web (English) reference(deprecated numbering scheme): Book 1, Hadith 236