The waterproofing remark I made was for a post where someone wanted to submerge their AEG for a underwater-surface beach landing. There were few practical ways to waterproof an AEG against that kind of water pressure other than heat sealing it into a plastic bag or a watertight pressure box similar to what is used for underwater cameras.
Haggis man has the right idea for top down rain. A light application of silicone oil will protect external screws and other steel fasteners if you give it time to spread into the threads. I find a silencer makes an effective rain shroud (unless you have an inner barrel extended to the end) keeping rain water out of the IB. If you don't point straight up, you shouldn't get rain into your barrel. I guess if you're getting an amazonian deluge, you could drill a small hole in the bottom of the silencer to keep if from flooding into the IB and mechbox.
A well sealed unibody AEG suffers from less seepage. For example an AUG would probably suffer less leakage as the forend would probably shed water well, keeping it out of the mechbox. Conversely a M4 with it's upper-lower seam and external motor-grip seam offers more places for water to run into the mechbox and motor.
Want nearly free GBB gas?