Description
This script is a store menu script. It stores all weapon details (cost, type of weapon such as primary, secondary, or other, trade in value, and whether it's restricted from purchase) in a keygroup table. Players can purchase items anywhere on the map at anytime. When they make a purchase, if they currently have a weapon of the same slot (primary or secondary) it will automatically compute the trade in value on that weapon and charge the difference. It will also remove the weapon so others can't pick it up afterward. Also will let the player know if they try to purchase a restricted item, or if they don't have sufficient funds.