Its highly possible, all you need is a tape recorder, and some know how. Sadly I have no know how adout this stuff, but I have an idea. Take a recording of a real automatic firearm fireing, than put that recording into the gun, hook it up so when you squeze the triger, the sound effect comes on, and there you have it!
CHEERS!