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

How would I check to see if they bought the Developer Product?

MPS = game:GetService("MarketplaceService")
id = 973839064	
local player = game.Players.LocalPlayer

script.Parent.MouseButton1Click:Connect(function()
	MPS:PromptProductPurchase(player, id)
end)

I need this for my tycoon. Thanks!

1 answer

✓ Accepted answer

inside a script:

local MarketplaceService = game:GetService("MarketplaceService")

MarketplaceService.ProcessReceipt = function(receiptInfo)
	local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)

	if player then
		
		if receiptInfo.ProductId == 973839064  then
		
		-- your code, for example:
		--leaderstats.Money.Value = leaderstats.Money.Value + 10000000
		  
		return Enum.ProductPurchaseDecision.PurchaseGranted
		
		end
	
	else
		  return Enum.ProductPurchaseDecision.NotProcessedYet
	end
	
end

7 comments

0

That's too complicated

0

??? is the only way

0

I write the code for you, you need only copy and paste this code.

0

I want to learn not copy and paste.

0

How i can help you if you have write only the localscript? You don't have the script part!

0

Dosen't matter any more, using what you have shown me, I made my own.

0

Thank you, but the next time please write "Not show the code", cya!

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