i tried searching everywhere but couldnt find anything
promptPurchaseEvent.OnServerEvent:Connect(function(plr, id)
mps:PromptPurchase(plr, id)
end)
mps.ProcessReceipt = function(receiptInfo)
local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
print(player.Name.. " bought an item")
return Enum.ProductPurchaseDecision.PurchaseGranted
end
local MarketplaceService = game:GetService("MarketplaceService")
local function onPromptPurchaseFinished(player, assetId, isPurchased)
if isPurchased then
print(player.Name, "bought an item with AssetID:", assetId)
else
print(player.Name, "didn't buy an item with AssetID:", assetId)
end
end
MarketplaceService.PromptPurchaseFinished:Connect(onPromptPurchaseFinished)