Similarly you say (in Psalms 50:7): "Hear, O My people, and I will speak; O Israel, and I will testify against you: I am God, your God." When Israel stood at Mount Sinai and said (in Exodus 24:7): "All that the Lord has spoken we will do and we will obey," Rabbi Yochanan said: Six hundred thousand angels came down and placed crowns upon their heads. Rabbi Simai said: He clothed them in purple. Rav Huna of Tzippori said: He girded them with girdles. Rabbi Shimon said: They gave them weapons, and the Great Name was inscribed upon them; and as long as it was in their hands, the angel of death could not have power over them, as it is said (in Exodus 32:16): "engraved upon the tablets." What is the meaning of "engraved" (charut)? Rabbi Yehudah says: Freedom (cheirut) from the kingdoms. Rabbi Nechemiah says: Freedom from the angel of death. Rabbi Pinchas the Priest, son of Chama, said in the name of Rabbi Yochanan, in the name of Rabbi Elazar son of Rabbi Yose [the Galilean]: If the angel of death should come and say to me, "Why was I created?", I would say to him: If I created you, I created you over the nations of the world, and not over My children. Why? Because I made them gods, as it is said (in Psalms 82:6): "I said: You are gods, and all of you are children of the Most High." Therefore, when He came to give them the commandments, He said to them: Hear what I am saying to you. Thus it is said: "Hear, O My people, and I will speak; O Israel, and I will testify against you: I am God, your God." See, here the Holy One, blessed be He, said to Moses: Even though I made you a god, I am your God, and you are a god only to Pharaoh, as it is said (in Exodus 7:1): "See, I have made you a god to Pharaoh."
Sinai Crowns and Freedom from the Angel of Death
Midrash Tanchuma Buber, Vaera 9:2
כיוצא בדבר אתה אומר שמעה עמי ואדברה ישראל ואעידה בך אלהים אלהיך אנכי (תהלים נ ז), כשעמדו ישראל על הר סיני ואמרו כל אשר דבר ה' נעשה ונשמע (שמות כד ז), אמר ר' יוחנן ירדו ששים רבוא מלאכים ונתנו עטרות בראשיהן, ר' סימאי אמר פורפירן הלבישן, רב הונא מצפורין אמר זוניאות חגרן, ר' שמע' אמר כלי זיין נתנו להם, השם הגדול היה חקוק בהן, וכל זמן שהיה בידן לא היה מלאך המות יכול לשלוט בהן, שנא' חרות על הלוחות (שם לב טז), מהו חרות, ר' יהודה אומר חירות מן המלכיות, ר' נחמיה אומר חירות ממלאך המות, אמר ר' פנחס הכן בר חמא בשם ר' יוחנן בשם ר' אלעזר בנו של ר' יוסי [הגלילי], אם יבא מלאך המות ויאמר לי למה נבראתי, אני אומר לו אם בראתיך, על אומות העולם בראתיך, ולא על בני, למה שעשיתי אותם אלהים, שנאמר אני אמרתי אלהים אתם ובני עליון כולכם (תהלים פב ו), לפיכך כשבא ליתן להם את הדברות אמר להם שמעו מה שאני אומר לכם, לכך נאמר שמעה עמי ואדברה ישראל ואעידה בך אלהים אלהיך אנכי, ראה כאן אמר הקב"ה למשה אע"פ שעשיתי אותך אלהים, אני הוא אלהיך, ואין אתה אלהים אלא לפרעה, שנאמר ראה נתתיך אלהים לפרעה.