Abu Hurairah reported,

The Messenger of Allah ﷺ said that Allah عز وجل said, "When My servant intends to commit a bad deed, do not record it against him until he commits it. If he commits it, record it as one bad deed. But if he abandons it for My sake, record it for him as a good deed. And when he intends to do a good deed but does not do it, record it for him as a good deed. If he does it, record it for him as ten good deeds, up to seven hundred."

Azami 593

Sahih

عن أبي هريرة قال

قال رسول الله ﷺ: قال الله عز وجل: إذا أراد عبدي أن يعمل سيئة فلا تكتبوها عليه حتى يعملها، فإن عملها فاكتبوها بمثلها، وإن تركها من أجلي فاكتبوها له حسنة، وإذا أراد أن يعمل حسنة فلم يعملها فاكتبوها له حسنة، فإن عملها فاكتبوها له بعشر أمثالها إلى سبعمائة.

الأعظمي 593صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Faith
Chapter
Belief in the angels
Section
Angels record the deeds of the hearts
Numbering
Jami al-Kamil 593 (2nd edition)
Azami 593