Hadith 16, 40 Hadith Qudsi
On the authority of son of Abbas (may Allah be pleased with them both), from the Messenger of Allah (ﷺ), among the sayings he related from his Lord (glorified and exalted be He) is that He said:
Allah has written down the good deeds and the bad ones. Then He explained it [by saying that] he who has intended a good deed and has not done it, Allah writes it down with Himself as a full good deed, but if he has intended it and has done it, Allah writes it down with Himself as from ten good deeds to seven hundred times, or many times over. But if he has intended a bad deed and has not done it, Allah writes it down with Himself as a full good deed, but if he has intended it and has done it, Allah writes it down as one bad deed.

It was related by al-Bukhari and Muslim.
عَنْ ابْنِ عَبَّاسٍ رَضِيَ اللَّهُ عَنْهُمَا، عَنْ النَّبِيِّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ، فِيمَا يَرْوِي عَنْ رَبِّهِ عَزَّ وَجَلَّ، قَالَ: 

"إِنَّ اللَّهَ كَتَبَ الْحَسَنَاتِ وَالسَّيِّئَاتِ، ثُمَّ بَيَّنَ ذَلِكَ: فَمَنْ هَمَّ بِحَسَنَةٍ فَلَمْ يَعْمَلْهَا، كَتَبَهَا اللَّهُ لَهُ عِنْدَهُ حَسَنَةً كَامِلَةً، فَإِنْ هُوَ هَمَّ بِهَا فَعَمِلَهَا، كَتَبَهَا اللَّهُ لَهُ عِنْدَهُ عَشْرَ حَسَنَاتٍ، إِلَى سَبْعِمِائَةِ ضِعْفٍ، إِلَى أَضْعَافٍ كَثِيرَةٍ، وَمَنْ هَمَّ بِسَيِّئَةٍ فَلَمْ يَعْمَلْهَا، كَتَبَهَا اللَّهُ لَهُ عِنْدَهُ حَسَنَةً كَامِلَةً، فَإِنْ هُوَ هَمَّ بِهَا فَعَمِلَهَا، كَتَبَهَا اللَّهُ سَيِّئَةً وَاحِدَةً". 
رواه البخاري ومسلم