Money system, inventory and shop

Hi everyone, I’m really new to LUA scripting, having only done the tutorials on the wiki.

I don’t really just WANT the files, I would like someone to explain how to do it so if I ever need to make something similar again, I know what I’m doing,

I need help making:

  • A script that gives a player cash for killing NPCS. The amount of cash differs, for example: Fast Zombies give $50, while Headcrabs give $10 (or something to that effect).

  • A shop that sells weapons (it could be bound to a key or if you press E near a certain NPC or something).

  • And an inventory system that keeps track of the stuff you pick up.

Thanks!

Add me on Steam. SpencerRawks