Narrated Abu Huraira: Allah’s Messenger (ﷺ) said, “Allah says,

  1. “If My slave intends to do a bad deed then (O Angels) do not write it unless he does it;
  2. if he does it, then write it as it is,
  3. but if he refrains from doing it for My Sake, then write it as a good deed (in his account).
  4. (On the other hand) if he intends to go a good deed, but does not do it, then write a good deed (in his account),
  5. and if he does it, then write it for him (in his account) as ten good deeds up to seven-hundred times.’ “

Reference: Sahih al-Bukhari (Oneness, Uniqueness of Allah (Tawheed))

Reference  : Sahih al-Bukhari 7501
In-book reference  : Book 97, Hadith 126
USC-MSA web (English) reference  : Vol. 9, Book 93, Hadith 592
  (deprecated numbering scheme)