Sunan Ibn Majah, Book 37, Hadith 130 (Ibn Majah 4233)

It was narrated from Abu Hurairah that the Messenger of Allah (ﷺ) said:

“People will be resurrected (and judged) according to their intentions.”