how to make the player to lose when they get hit by a beam of light from a UFO in my game

in my game i want a ufo to be going round the map scanning things with its light beam. And if the player gets hit they start to levitate before they lose. How do i make this possible?