‘Abdullāh ibn ‘Abbās (may Allah be pleased with him) reported that the Messenger (may Allah's peace and blessings be upon him) 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."
Explanation:
This noble Hadīth indicates that the intent and keenness to do it is recorded as a good deed, even if it is not actually done, and gets multiplied from ten times to many times over if it is done. Conversely, if someone intends to do a bad deed yet abandons it for the sake of Allah, it will be recorded for him as a good deed, and if he does it, it will be recorded as one bad deed; and that whoever intends to do a bad deed and abandons it, nothing will be recorded against him. All this points to the vast mercy and immense bounty of Allah, the Almighty.