How to make a npc spawn and sell gun license????

How can I make an npc spawn and give an option to sell gun licenses to players! Any help would be appreciated!!