We believe that Allah created the Pen that wrote down destiny. The Messenger of Allah (may Allah's peace and blessings be upon him) said: "The first thing Allah created was the Pen. He said to it: 'Write.' It asked: 'What should I write, my Lord?' He said: 'Write what was decreed about everything till the Last Hour comes.'" [Narrated by Abu Dāwūd (4700), At-Tirmidhi (2155, 3319), At-Tayālesi (578), Ahmad (22705, 22707), and Ibn Abi ‘Āsim in As-Sunnah (115)]
We believe that there are numerous pens. In a Hadīth about Al-Isrā’ and Al-Mi‘rāj, the Prophet (may Allah's peace and blessings be upon him) said: "Then I was made to ascend until I reached a level where I heard the creaking of the pens." [Narrated by Al-Bukhāri (349) and Muslim (163)]
And it is mentioned a number of times in the Qur’an and the Sunnah that the angels write down people's deeds. Allah Almighty says: {And there are watchers over you, honorable scribes, who know whatever you do.} [Surat al-Infitār: 10-12]
He also says: {When the two angel scribes, constantly accompanying him, one on the right, and the other on the left. Not a single word he utters but there is with him a vigilant watcher, ready [to record it].} [Surat Qāf: 17-18]
In another verse, He says: {When We give people a taste of mercy after being afflicted with adversity, they start plotting against Our verses. Say: "Allah is swifter in planning [retribution]. Our angel-messengers record whatever you plot."} [Surat Yūnus: 21]
And He says: {Do they think that We do not hear their secret talks and private counsels? Yes indeed, and Our angel-messengers are with them recording everything.} [Surat az-Zukhruf: 80]
And the Prophet (may Allah’s peace and blessings be upon him) said: "There is no one amongst you and no created soul except that his place in Paradise or Hellfire is written down and except that he is written down as miserable or blissful." [Narrated by Al-Bukhāri (4948), Muslim (2647), Abu Dāwūd (4694), At-Tirmidhi (2136, 3344), and Ibn Mājah (78)]
In another Hadīth, he (may Allah’s peace and blessings be upon him) said: "If one of you practices Islam properly, every good deed he does will be recorded for him ten to seven hundredfold, and every evil deed he does will be recorded as it is." [Narrated by Al-Bukhāri (42, 7501), Muslim (128, 129, 130), and At-Tirmidhi (3073)]