Okay so I have made the script, but I am not sure how to make it take away a certain amount for each item and not let the player have the item if they don't have that amount of money. Here is the script:
script.Parent.DialogChoiceSelected:connect(function(player, choice)
if choice == script.Parent.C then
gunB = game.Lighting["Burger"]:clone()
gunB.Parent = player.Backpack
elseif choice == script.Parent.D then
gunC = game.Lighting["Pizza"]:clone()
gunC.Parent = player.Backpack
elseif choice == script.Parent.E then
gunC = game.Lighting["Ice"]:clone()
gunC.Parent = player.Backpack
elseif choice == script.Parent.F then
gunC = game.Lighting["Cola"]:clone()
gunC.Parent = player.Backpack
end
end)

1 comment
Okay thank you so much it really helps! The answers have been accepted :)