To get the ray gun you must play the mission "Little Resistance". When you get to the main laid on the mission, you will find 4 holes. The holes will be in a row and step in each of them from right to left. When you get to the last hole, 4 statues will come out of the ground. Each of the statues holds a ray gun for you to take.