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

I have a couple dev products but whenever they each add 500 gems. How do i fix this?

Asked by 4 years ago

+100 gems

local MarketplaceService = game:GetService("MarketplaceService")
local plrs = game:GetService("Players")
local gem500 = 985556504

local function processReceipt2(recieptInfo)

    local plr = plrs:GetPlayerByUserId(recieptInfo.PlayerId)
    if not plr then
        return Enum.ProductPurchaseDecision.NotProcessedYet
    end

    if plr then

        plr.Gems.Value = plr.Gems.Value + 500

    end

    return Enum.ProductPurchaseDecision.PurchaseGranted

end

MarketplaceService.ProcessReceipt = processReceipt2

+500 gems

local MarketplaceService = game:GetService("MarketplaceService")
local plrs = game:GetService("Players")
local gem500 = 985556504

local function processReceipt2(recieptInfo)

    local plr = plrs:GetPlayerByUserId(recieptInfo.PlayerId)
    if not plr then
        return Enum.ProductPurchaseDecision.NotProcessedYet
    end

    if plr then

        plr.Gems.Value = plr.Gems.Value + 500

    end

    return Enum.ProductPurchaseDecision.PurchaseGranted

end

MarketplaceService.ProcessReceipt = processReceipt2

everything else works just fine, the buttons promt the right item but idk why it only gives 500

1
you just posted two identical scripts jediplocoon 877 — 4y
0
Because both the scripts are adding 500 gems kingblaze_1000 359 — 4y
0
oh no that was an accident. itshydro7 1 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

this was supposed to be the first one sorry

local MarketplaceService = game:GetService("MarketplaceService")
local plrs = game:GetService("Players")
local id = 985264450

local function processReceipt(recieptInfo)

    local plr = plrs:GetPlayerByUserId(recieptInfo.PlayerId)
    if not plr then
        return Enum.ProductPurchaseDecision.NotProcessedYet
    end

    if plr then

        plr.Gems.Value = plr.Gems.Value + 100

    end

    return Enum.ProductPurchaseDecision.PurchaseGranted

end

MarketplaceService.ProcessReceipt = processReceipt
Ad

Answer this question