The Prophet ﷺ said, "If a person intends a good deed and performs it, ten good deeds are recorded for him. If he does not perform it, one good deed is recorded for him. If he intends a bad deed and performs it, one bad deed is recorded against him. If he does not perform it, a good deed is recorded for him."
حدثنا يحيى حدثنا الحسين بن ذكوان عن أبي رجاء
عن النبي ﷺ قال إن هم بحسنة فعملها كتبت عشرا وإن لم يعملها كتبت حسنة وإن هم بسيئة فعملها كتبت سيئة وإن لم يعملها كتبت حسنة
Its chain of transmission is sahih. Abu Raja is Al-Attaridi, Imran bin Milhan, with the mim vocalized as kasrah, though some say it is fathah with the lam vocalized as sukoon. He was an early tabii, a mukhadram, and trustworthy. He lived through the Jahiliyyah and lived a long life, more than 120 years.Bukhari related the hadith at length, 11:277-282, and so did Muslim, 1:48. It will come again at length as in Muslim's version, 2519, 2828.