Thoth was a moon god who played an important role in the Osiris legend and the judgment of the dead in the Hall of Maat. Thoth was said to be mighty in knowledge and divine speech. The inventer of spoken and written language. As the lord of books he was the scribe of the gods and patron of all scribes. He is credited with inventing astronomy, geometry, and medicine. Thoth was the measurer of the earth and the counter of the stars, the keeper and recorder of all knowledge. It was Thoth who was believed to have written important religious texts such as The Book of the Dead. In this text, he appears in the Hall of Maat as a scribe holding a writing reed and palette to record the results of the weighing of the deceased's heart against the feather of Maat.