Okay, so, i'm new to developer products, I really want to make a gui ingame that sells one. I just don't know HOW to do it.
✓ ANSWER ACCEPTED
How'd I sell a Developer Product?
1 answer
✓ Accepted answer
--[[ Replace the following:
idHERE: The Developer Item ID
statnameHERE: The name of your leaderstat eg: diamonds, cash etc.
((VALUE)): The amount you want to give
]]
local buyButton = game.Workspace.BuyButton.SurfaceGui.TextButton
local user = game.Players.LocalPlayer.userId
buyButton.MouseButton1Click:connect(function()
local productId = idHERE
Game:GetService("MarketplaceService"):PromptProductPurchase(game.Players.LocalPlayer, productId)
game.Players.LocalPlayer.leaderstats.statnameHERE.Value = game.Players.LocalPlayer.leaderstats.statnameHERE.Value + ((VALUE))
end)
Hope this helps :)
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
Do I put this script in the button? Oh and also, do I have to make a actual gui for this like: StarterGui TextButton Script
You need a brick called "BuyButton" in Worspace, ScreenGui in it and TextBox in the ScreenGui. Then copy this script into a LocalScript in StarterPack
Sorry, I made a mistake. I just corrected the script
Okay. Mind PMing me in roblox and giving me the instructions?