When me and my friends tested the Developer Products it says the product is not for sale
local MarketplaceService = Game:GetService("MarketplaceService")
local buyButton = script.Parent.TextButton
local productId = 000000000 -- I didn't show the real productId
buyButton.MouseButton1Click:connect(function()
MarketplaceService:PromptProductPurchase(player, productId)
end)
I also tried to make a Developer Product that increases your money value by 2000
--Script in Starter Pack
local buyButton = game.Workspace.BuyButton.SurfaceGui.TextButton
local productId = 20518668
-- when player clicks on buy brick prompt him/her to buy a product
buyButton.MouseButton1Click:connect(function()
game:GetService("MarketplaceService"):PromptProductPurchase(game.Players.LocalPlayer, productId)
end)
--Script in button
local MarketplaceService = Game:GetService("MarketplaceService")
local ds = game:GetService("DataStoreService"):GetDataStore("PurchaseHistory")
local productId = 20518668
-- define function that will be called when purchase finished
MarketplaceService.ProcessReceipt = function(receiptInfo)
-- find the player based on the PlayerId in receiptInfo
for i, player in ipairs(game.Players:GetChildren()) do
if player.userId == receiptInfo.PlayerId then
-- check which product was purchased
if receiptInfo.ProductId == productId then
-- handle purchase
player.leaderstats.Money.Value = player.leaderstats.Money.Value + 2000
end
end
end
-- record the transaction in a Data Store
local playerProductKey = "player_" .. receiptInfo.PlayerId .. "_purchase_" .. receiptInfo.PurchaseId
ds:IncrementAsync(playerProductKey, 1)
-- tell ROBLOX that we have successfully handled the transaction
return Enum.ProductPurchaseDecision.PurchaseGranted
end

2 comments
I see it says LproductId
I will try it