Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

I am using ProcessReceipt at the top of Kohl's Main Script and it does not work?

Asked by
Rackm 10
10 years ago

There is no errors when entering or someone buying but i put this at the top of the MAIN PART of Kohls Admin Script:

MarketplaceService = Game:GetService("MarketplaceService")
MarketplaceService.ProcessReceipt = function(receiptInfo)
players = game.Players:GetPlayers()

for i=1,#players do
    if players[i].userId == receiptInfo.PlayerId then
        if receiptInfo.ProductId == GamePassId then
            table.insert(admins,players[i].Name)
        end
        if receiptInfo.ProductId == GamePassId1 then
            table.insert(owners,players[i].Name)
        end
    end
end
    return Enum.ProductPurchaseDecision.PurchaseGranted 
end

What it is supposed to do, right away when somone buys a gamepass it will automatically give them admin.

What is wrong with it?

0
Please edit your post and use the Lua code formatting button. BlueTaslem 18071 — 10y
0
There Rackm 10 — 10y
0
Check to make sure that you're no using ProcessReceipt anywhere else or it might overwrite this one. TheGuyWithAShortName 673 — 10y
0
No there isn't Rackm 10 — 10y

Answer this question