Need Help with lua.

I am currently learning lua and trying to modify one gamemode and I was wondering how would I got about making this:

A menu within the gamemode that would allow player to buy different kind of weapons although they would only be allowed to select one weapon from each category to spawn with.E.g “Pistol” “Heavy” and “Misc”.To make this clearer the players will be able to buy all weapons but only spawn with selected ones from each category.The weapons that players have bought will be stored in a file.

Sorry if this is confusing but I tried my best to explain what I am trying todo.

Try watching these videos:
[sp]Part 1 of episode 1
Part 2 of episode 1 Episode 3 Episode 4 [/sp]