Developer Products work in Studio, but not on normal servers

local MarketplaceService = game:GetService("MarketplaceService")
local winBrick = workspace.Storage.End.WinBrick
local DataStoreService = game:GetService("DataStoreService")
local purchaseHistoryStore = DataStoreService:GetDataStore("PurchaseHistory")
local Players = game:GetService("Players")
local KillMessage = game.ReplicatedStorage.KillMessage

-- Table setup containing product IDs and functions for handling purchases
local productFunctions = {1339707522, 1339710535, 1153921276, 1153921344, 1153921386}
productFunctions[1339707522] = function(receipt, player)
	for i, player in ipairs(game.Players:GetPlayers()) do
		if player.Character then
			local hum = player.Character:FindFirstChild('Humanoid')
			if hum then
				hum.Health = 0
			end 
		end
	end
	KillMessage:FireAllClients(player)
		return true
end

productFunctions[1339710535] = function(receipt, player)
	player.Character:SetPrimaryPartCFrame((winBrick.CFrame)* CFrame.new(0, -2, -20))
		return true
end

productFunctions[1153921276] = function(receipt, player)
	player.leaderstats.Coins.Value = player.leaderstats.Coins.Value + 500
	return true
end
productFunctions[1153921344] = function(receipt, player)
	player.leaderstats.Coins.Value = player.leaderstats.Coins.Value + 2000
	return true
end
productFunctions[1153921386] = function(receipt, player)
	player.leaderstats.Coins.Value = player.leaderstats.Coins.Value + 10000
	return true
end

local function processReceipt(receiptInfo)

	local playerProductKey = receiptInfo.PlayerId .. "_" .. receiptInfo.PurchaseId

	local success, isPurchaseRecorded = pcall(function()
		return purchaseHistoryStore:UpdateAsync(playerProductKey, function(alreadyPurchased)
			if alreadyPurchased then
				return true
			end

			local player = Players:GetPlayerByUserId(receiptInfo.PlayerId)
			if not player then
				
				return nil
			end

			local handler = productFunctions[receiptInfo.ProductId]

			local success, result = pcall(handler, receiptInfo, player)
			
			if not success or not result then
				error("Failed to process a product purchase for ProductId:", receiptInfo.ProductId, " Player:", player)
				return nil
			end

		
			return true
		end)
	end)

	if not success then
		error("Failed to process receipt due to data store error.")
		return Enum.ProductPurchaseDecision.NotProcessedYet
	elseif isPurchaseRecorded == nil then
		
		return Enum.ProductPurchaseDecision.NotProcessedYet
	else	

		return Enum.ProductPurchaseDecision.PurchaseGranted
	end
end

MarketplaceService.ProcessReceipt = processReceipt

when i buy 500 coins in studio it works, but in normal game it just wont work (including other dev products)