"Dr. Smith and Will find the wreckage of an alien spaceship
and a mysterious machine that creates anything they wish for.
Word of the magical machine reaches the Robinsons who want to
use the device as well, but their eventual greed forces the Professor
to get rid of it. Refusing to destroy it, Smith takes it back to the alien
ship, but there he summons a servant to tend to his needs. The machine
instead conjures a menacing mummy-like creature who tries to take the
machine away."
what episode was that? I vaguely remember that as being one of the scariest things from my childhood