how do i make it so when i let the player buy a dev prodact it will do the suff only if he buy and not when he cancle
1 Like
hello
Server script
local Players = game:GetService('Players')
local MarketplaceService = game:GetService('MarketplaceService')
local Prodactid = 0 -- Change it to your product ID
function processReceipt(Info)
local Player = Players:GetPlayerByUserId(Info.PlayerId) -- player that bought the product
if Player == nil then
return -- returns if the player is not found
end
if Info.ProductId == Prodactid then
-- The code that will run after everything is verified
end
end
MarketplaceService.ProcessReceipt = processReceipt