The Watery Abyss existed first, and was father to Great Ra. From Great Ra's words, everything was created. He blew the first air, which became Shu, and spat the first moisture, which became Tefnut. Shu and Tefnut became the god of air and the god of moisture, respectively. Tefnut organized the world, and Shu was the live force. They married, Shu being the husband and Tefnut being the wife.
Ra also created the Eye of Ra to see what he was creating, and she was the goddess Hathor. With the eye, Ra wept and humans formed from his tears.
Hathor was upset because she wasn't attached to Ra, so he stuck her on his forehead. He then created serpents from which other animals came.
Ra was warned by the Watery Abyss that humans had grown too rebellious, so he took Hathor and ordered her to punish the people.
Hathor went to earth and slew millions of humans. The streets of the town of Chetenuten began to run like a river with blood because of her horrific endeavour. So much blood drained into the Nile that it overflowed the riverbanks, and the bloody water flooded the land, destroying everything. This water eventually ran into the sea, which overflowed as well. Hathor began drinking this horrible mixture of blood and water.
Ra was displeased with Hathor's work, as he had only wanted to punish, and not destroy, the human race. So he asked Thoth, the wisest God, for help. He then told the Goddess Sektet to mix together dada, fruit and barley to make beer. The beer was then to be mixed with human blood, in the hopes that it would attract Hathor.
Ra's servents were then ordered to pour out the mixture on the remaining land near Hathor. The beer became a great sea, and Hathor was drawn to it by the smell of the blood. She drank the beer until she was so intoxicated that she staggered off to sleep, leaving the last few humans behind.
From those humans, earth was repopulated.
Ra left the upkeep of earth to Thoth from then on, and he went off to rest on the back of the great cow of heaven. Thoth taught humans how to be civilized.