When the regular alien reaches the top of the map holding a walking man, he turns into a " Raging alien that is magnetized to the spaceship " , this is the code that I am looking to find.

I am a first year student that just finished my intro to programming class, and I am trying to finish my game before the next quarter starts, ( to impress my teacher). Any help on this matter would be most appreciated.
Thank You