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

How do I implement ProcessReceipt into this code?

The assetID is a Developer Product. On the wiki, it says I may need to use *ProcessReceipt * but I do not know how to implement this to my code. Please help.

game:GetService("MarketplaceService").PromptPurchaseFinished:Connect(function(player,assetID,wasBought)
local url = "" -- In My Real Game There is a URL for Discord WebHook
local HTTP = game:GetService("HttpService")

if assetID == 971131178 and wasBought == true then 
	local data = {
						['username'] = player.Name,
						['content'] = "has bought the product."
				}
				local newdata = HTTP:JSONEncode(data)
				HTTP:PostAsync(url, newdata)
				player:Kick("Product  Sucessfully Bought. Purchase Logs sucessfully sent. We will send you the product soon.")
				print("Bought product.")
	end

end)

1 answer

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