Sunnah.com : Book 14, Hadith 23
Grading supplied with this record: Sahih (Darussalam)
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
إِذَا كَانَ يَوْمُ الْجُمُعَةِ كَانَ عَلَى كُلِّ بَابٍ مِنْ أَبْوَابِ الْمَسْجِدِ مَلاَئِكَةٌ يَكْتُبُونَ النَّاسَ عَلَى مَنَازِلِهِمُ الأَوَّلَ فَالأَوَّلَ فَإِذَا خَرَجَ الإِمَامُ طُوِيَتِ الصُّحُفُ وَاسْتَمَعُوا الْخُطْبَةَ فَالْمُهَجِّرُ إِلَى الصَّلاَةِ كَالْمُهْدِي بَدَنَةً ثُمَّ الَّذِي يَلِيهِ كَالْمُهْدِي بَقَرَةً ثُمَّ الَّذِي يَلِيهِ كَالْمُهْدِي كَبْشًا "
It was narrated from Abu Hurairah, who was attributing it to the Prophet (ﷺ):
"When Friday comes, at every gate of the masjid there are angels who write down the people's names in the order in which they come, then when the imam comes out, they roll up the scrolls and listen to the khutbah. The one who comes early to the prayer is like the one who sacrifices a camel, then the one who comes after him is like the one who sacrifices a cow, then the one who comes after him is like the one who sacrifices a ram" until he mentioned a chicken and an egg.
Full reference and source
Sunnah.com : Book 14, Hadith 23 English : Vol. 2, Book 14, Hadith 1387 Arabic : Book 14, Hadith 1397
View source on Sunnah.com (opens in a new tab)