I tried doing this with a script awhile ago but it never synced. I have since come across a
way easier method to use thanks to a post by Rm860 in a recent discussion on random powerups.
All you have to do is make a item collection and make some permutations in it for each weapon you want to have included. Rather simple, just an item collection, no scripting required. It was so easy in fact I wished I had thought of that first before spending all that time trying to script it...
Oh well, live and learn.
Orange Gecko mentioned that weight should be thought of like a percent. If you want a weapon to show up more commonly, make its weight heavier (higher) instead of adding in another copy of it. Make sure the total weight of all permutations adds up to 100 as you might get compile errors if its higher or lower. I don't know what error you would get for sure but better safe then sorry.
Once you make your item collection with a couple different weapons in it, place it in your starting equipment like how you would a normal weapon. If you only want randomized starting weapons for certain gametypes you would set that when you create the scenario starting equipment. You don't need to set a respawn timer in the item collection tag like the invisi-overshield powerup does unless you want it to respawn faster or slower then normal weapon pickups.
I think I've covered everything someone would need to do this. I tested this out by modding Beavercreak so that all starting weapons and all weapons on the map were the randomized item collection I had made. Every new game had different weapons on the map and each time you respawned you (usually) had different weapons.
In my testing I noticed two glitches:
* If you place the same randomized item collection or have some common weapons between two different item collections, in for both primary and secondary weapon in your starting equipment you run the risk of randomly getting the same weapon from both when you spawn: The result is no secondary weapon.
The work around is to not have a weapon appear more then once in the starting equipment - either in a randomized item collection or a normal item collection.
* Randomized item collections of weapons placed directly on the map will change on their own from time to time just like the invisi-overshield powerup with or without a respawn timer value. This is unavoidable and sometimes annoying - especially when you were going for that rocket launcher only to have it change to a plasma pistol just as you get to it. :P
It would be cool to see this idea used in a H2 Map or something, no credit to me required though. I may eventually upload a test map to show some of the neat stuff that can be done with this.