local Service = game:GetService("MarketplaceService");
local SellItems = {
["Knife"] = 24441926; -- If IDHERE is left 0, the item will be free.
["Mk-17"] = 24442025;
["Uzi"] = 24442001;
["Explosive Vest"] = 24441966;
}
for Name,Item in pairs(SellItems) do
local Choice = script.Choice1:Clone();
Choice.Name = Name
Choice.UserDialog = Name
Choice.ResponseDialog = "Let's not tell the police about this eh?";
Choice.Parent = script.Parent;
end
function GetChoice(Name)
for _,ID in pairs(SellItems) do
if _ == Name then
return _,ID
end
end
return
end
script.Parent.DialogChoiceSelected:connect(function(Player, Choice)
local s,e = coroutine.resume(coroutine.create(function()
if SellItems[Choice.Name] and Player then
local Choice,ID = GetChoice(Choice.Name)
if Player.Character and Choice and ID then
if not Player.Character:findFirstChild(Choice) then
if Player:findFirstChild("Backpack") then
if not Player.Backpack:findFirstChild(Choice) then
print("Does not own");
Service.ProcessReceipt = (function(receiptInfo)
local Gun = game.Lighting:WaitForChild(Choice):Clone()
Gun.Parent = Player.Backpack;
Service.ProcessReceipt = nil;
end)
Service:PromptProductPurchase(Player,ID);
end
end
end
end
end
end))
if not s then Instance.new("Hint",game.Workspace).Text = "Error: "..e end
end)
How do I change the ID's uptop to a different ID that would give me money?

2 comments
How do I earn the money from what people buys them?
When you create a Developer Product you will be asked to set a price in R$, you will recieve the R$ every time your Developer Product is sold. Please accept my answer if it helped.