The Infinite Tsukuyomi does not affect Hashirama, Tobirama, Hiruzen and Minato because they are reanimated. Hagoromo, the Sage of the Six Paths, appears and explains to the four that Hashirama and Madara are the reincarnations of his sons Ashura and Indra. Hagoromo recounts the tale of how he founded Ninshu, the Ninja Creed, and about the lives of Ashura and Indra.
I dreamed that
he will call forth a miracle.
حلمتُ أنه سيجلب معجزة
Ich träumte, er werde
ein Wunder vollbringen.
Soñé que ese chico
podría hacer milagros.
Soñé que ese chico
podría hacer milagros.
Ho sognato che 
sarà fautore di un miracolo.
Sonhei que ele fará um milagre.