"Whoever comes with a good deed, for him are ten times the like thereof." This is concerning the believers, and this was before the revelation of, "The likeness of those who spend their wealth in the way of Allah is as the likeness of a grain that grows seven ears," until the end of the verse.
"And whoever comes with a bad deed" (this also refers to the believers). The "bad deed" here refers to evil actions. "He shall be recompensed only with the like thereof."
Yahya [narrated] from Abu Umayyah, from Sa'id al-Maqburi, from Abu Hurayrah, who said:
The Messenger of Allah (ﷺ) said: "Your Lord says: 'If My servant performs a good deed, record it for him as ten times its like, up to seven hundred-fold. If he intends to do it but does not perform it, record it for him as one [good deed]. If he performs a bad deed, record it as one, and if he intends it but abandons it for My sake, then record it for him as a good deed.'"
Surah al-An'am from verse (161) to verse (165).
﴿مَنْ جَاءَ بِالْحَسَنَةِ فَلَهُ عَشْرُ أَمْثَالهَا﴾ هَذِهِ فِي الْمُؤْمِنِينَ، وَكَانَ هَذَا قَبْلَ أَنْ تُنَزَّلَ ﴿مَثَلُ الَّذِينَ يُنْفِقُونَ أَمْوَالَهُمْ فِي سَبِيلِ اللَّهِ كَمَثَلِ حَبَّةٍ أَنْبَتَتْ سَبْعَ سَنَابِلَ﴾ الْآيَة.
﴿وَمن جَاءَ بِالسَّيِّئَةِ﴾ (وَهَذِهِ فِي الْمُؤْمِنِينَ أَيْضًا﴾ السَّيِّئَةُ هَا هُنَا هِيَ الْأَعْمَالُ السَّيِّئَةُ ﴿فَلا يُجْزَى إِلَّا مثلهَا﴾.
يَحْيَى: عَنْ أَبِي أُمَيَّةَ، عَنْ سَعِيدٍ الْمَقْبُرِيِّ، عَنْ أَبِي هُرَيْرَةَ قَالَ:
قَالَ رَسُولُ اللَّهِ ﷺ: " قَالَ رَبُّكُمْ: إِذَا عَمِلَ عَبْدِي حَسَنَةً فَاكْتُبُوهَا لَهُ بِعشر أَمْثَالهَا إِلَى سَبْعمِائة ضِعْفٍ، وَإِنْ هَمَّ بِهَا وَلَمْ يَعْمَلْهَا فَاكْتُبُوهَا لَهُ وَاحِدَةً، وَإِنْ عَمِلَ سَيِّئَةً فَاكْتُبُوهَا بِوَاحِدَةٍ، وَإِنْ هَمَّ بِهَا فَتَرَكَهَا مِنْ أَجْلِي فاكتبوها بحسنة ".
سُورَة الْأَنْعَام من الْآيَة (١٦١) إِلَى الْآيَة (١٦٥).