This Mad-Eye relies on Arduino, not magic
In the Harry Potter series, professor Alastor Moody is known for wearing a very distinct prosthetic eyeball that moves in a “mad” manner. When Instructables member replayreb’s son decided to go to a costume party dressed as this character, he took the opportunity to make a replica for him.
The device is controlled by an Arduino Uno stored in a wearer’s pocket and transmits signals to the eyepiece via a 3.5mm stereo jack. A servo then actuates half of a ping pong ball decorated with an iris and pupil to create the Mad-Eye effect.
A potentiometer is also hooked up to the Uno, allowing the mock Moody to complement the motion of the fake eye with the one that’s exposed.