Dev product not working

Hello there! I am trying to make a dev product. The prompt purchase works but when the player purchases it, no tokens are added .I suspect that the callback is not working or i got the callback wrong but i’ve tried fixing that it still didnt work. It printed 1 and 2 and “purchasing” but not “yea” . No error on output too
local script:

wait(1)
local button = script.Parent
local Id = button.ProductId.Value
local plyr = game.Players.LocalPlayer
local MarketPlaceService = game:GetService("MarketplaceService")
button.MouseButton1Click:Connect(function()
	print("1")
	MarketPlaceService:PromptProductPurchase(plyr, Id)
	print("2")
end)

server:

local plyrs = game:GetService("Players")
local MarketPlaceService = game:GetService("MarketplaceService")

local function processReceipt(receiptInfo)
	print("purchasing")
	local plr = plyrs:GetPlayerByUserId(receiptInfo.PlayerId)
	local productId = receiptInfo.ProductId
	if not plr then
		return Enum.ProductPurchaseDecision.NotProcessedYet
	end
	if plr then
		if productId == "1232493039" then
			local add = 500
		elseif productId == "1232493120" then
			local add = 1000
		elseif productId == "1232493242" then
			local add = 1500
		elseif productId == "1232493507" then
			local add = 4100
		elseif productId == "1232493505" then
			local add = 11000
			local tokens = plr.PlayerValues.Tokens
			tokens.Value = tokens.Value +add
			print(add)	
		end
		return Enum.ProductPurchaseDecision.PurchaseGranted
	end
	print('yea')
	
end
MarketPlaceService.ProcessReceipt = processReceipt

any errors in the output?

as mentioned in the thread,no outputs were mentioned

You are checking if the ProductId is equal to string values. The ProductId is a number, and needs to be compared with numbers.

If you don’t want to change every single if statement, just make the following revision:

local productId = tostring(receiptInfo.ProductId)

Another note that this script won’t do anything… Here is a revised script for you.

local plyrs = game:GetService("Players")
local MarketPlaceService = game:GetService("MarketplaceService")

MarketPlaceService.ProcessReceipt = function(receiptInfo)
	local plr = plyrs:GetPlayerByUserId(receiptInfo.PlayerId)
	local productId = receiptInfo.ProductId
	if not plr then
		return Enum.ProductPurchaseDecision.NotProcessedYet
	end
	local ids = {[1232493039] = 500, [1232493120] = 1000, [1232493242] = 1500, [1232493507] = 4100, [1232493505] = 11000}
	local tokens = plr.PlayerValues.Tokens
	tokens.Value += ids[productId] or 0
	return Enum.ProductPurchaseDecision.PurchaseGranted
end