Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How can I sell a item more then once?

So for the game I am working it is come to my attention that a health boost I am selling would be better if people could buy it more then once. It gives you health 25 for every time you buy it but i have no clue how to do it. I search up on goggle but no luck how can i do this?

5 answers

Developer Products can be bought multtiple times, in game. This is a feature for NBC and BC (everyone). If you wish, I can provide you a code, that will work for Developer Products, but not for Player or Clan Points.

local buyButton = game.Workspace.Buttons.BuyButton.SurfaceGui.TextButton
while true do
buyButton.MouseButton1Click:connect(function()
    local productId = 19251902 --Change to your Developer ID (Create one first)
    Game:GetService("MarketplaceService"):PromptProductPurchase(game.Players.LocalPlayer, productId)
    game.Players.LocalPlayer.leaderstats.Diamonds.Value = game.Players.LocalPlayer.leaderstats.Diamonds.Value + 10
end)
wait()
end

--If you need any more assistance, feel free to PM me, and I will help you as soon as I can

6 comments

0

Please if you can

0

To set up developer products, simply configure your game, click Developer Products and create a DP.

0

Would you mind considering this as the Correct Answer if this helps you?

0

What makes this answer a downrate...?

0

I didn't downrate it - buuut... why are you connecting the MouseButton1Click event in an infinite loop? You only need to connect it once...

0

I tested it myself, It will only work once. putting it in an infinite loop will enable you to click it a number of times.

By using a developer product. Developer products are gamepasses that can repeat more than once, they give Player points just as what you would see at player point markets. But be aware, the product's ID are separate from the public roblox ID's such as place .etc, the Product's are only gamepasses.etc

What kind of answer is that?

2 comments

0

... The two answers above are both right.

0

More to the point, what kind of question is that? No code, no reference to how your system works or how Player's in you game buy things... what did you expect?

--- google

--- but no lucky how can i do this? +++ MODELS IN ROBLOX STUDIO AND I FOUND IT

This discussion is preserved as it was. New answers, comments, and votes are closed.