I have quite a bit of experience with foam weapons and what works well is to core the model using polystyrene board (an insulation foam - like what FirstPick mentioned) here you can print out the gun on paper to the scale desired (i used this image for mine) this will guarantee that the rive has the correct proportions and be the scale you need (this process might take some time as you will need to tape and cut the paper cut out to check scale.
and then building up using various foams (EVA, and craft foams)
and using dowel rods and PVC for barrels.
when the prop is finished and unpainted it will look a lot like this
http://i1094.photobucket.com/albums/i441/rickrtickr/IMG_0093_zpse63e50e6.jpg
This is where i must push the necessity for caution! the polystyrene reacts rather violently to spray paints and plastidip and will completely disintegrate. to counter act this problem you can get a tube of acrylic hand/brush paints. this paint will dry as a plastic much like plastidip (Use 2 full coats before spray paint) or you can also paint the entire gun using these paints (if you are comfortable mixing the various types of grey that you might need)
I use only the acrylic paints on my props and this is the result of the battle rifle above.
I had roughly 15 hours of solid work in this so expect at least that.
I you have any more questions on this process i am all to happy to help