Dialog shops are easy to create and can be made to sell many different items, such as weapons, cars, or upgrades. They can also be used in a wide range of games from adventure games to RPGs. In this tutorial will be going over how to make a weapons shop.
As the shop is going to sell weapons, we will need to select at least one weapon to sell in the shop. There are some great weapons in the "Tools & Weapons" category of the toolbox.
Now that we have a weapon we can get started. The weapon(s) should be located in the Workspace, and we need put any weapons into ReplicatedStorage. Rename the weapon to "Weapon1", and if there is more than one weapon, name them like so: "Weapon1", "Weapon2", etc. At this point the ReplicatedStorage should look something like this (if there is more than one weapon, it will look slightly different):
In a shop there is always someone behind the counter ready to help you, and we now need to make this person. This seller can be as creative as you want her to be; for this tutorial I will be using a basic Part inside a Model. We now need to insert a Dialog into the seller, make sure that the part you insert it into is named "Head". Next we will need to insert a Humanoid into the Model of the seller.
To start, select the Dialog that was created and in the properties window change the Purpose value to "Shop". In the properties window again change the InitialPrompt value to whatever the shop keeper should say when the player interacts with her, I will be using "Welcome to my shop!".
Insert -> Object - > DialogChoice.
Note: Any of the above text in quotations can be changed, it does not affect the shop.
Next we will need to Insert some more DialogChoices into the DialogChoice we just made, insert as many DialogChoices as you do weapons. Rename them from "ChoiceA" to whatever amount of weapons you are selling, so if there were three weapons they would go from "ChoiceA" to "ChoiceC".
The Dialog should now look something like this:
Note: The code below uses a Leaderboard.