Help with currency purchase

I have an old script here which grants currency after purchasing it.
could anyone tell me why it wont work? I checked the output but it doesnt say anything

local MPS = game:GetService("MarketplaceService")

MPS.ProcessReceipt = function(receiptInfo)

	if receiptInfo.ProductId == 1298151173 then
		local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
		player.leaderstats.Rukons.Value = player.leaderstats.Rukons.Value + 80
		return Enum.ProductPurchaseDecision.PurchaseGranted

	elseif receiptInfo.ProductId == 1298151384 then
		local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
		player.leaderstats.Rukons.Value = player.leaderstats.Rukons.Value + 200
		return Enum.ProductPurchaseDecision.PurchaseGranted

	elseif receiptInfo.ProductId == 1298151925 then
		local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
		player.leaderstats.Rukons.Value = player.leaderstats.Rukons.Value + 550
		return Enum.ProductPurchaseDecision.PurchaseGranted

	elseif receiptInfo.ProductId == 1298152091 then
		local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
		player.leaderstats.Rukons.Value = player.leaderstats.Rukons.Value + 1200
		return Enum.ProductPurchaseDecision.PurchaseGranted

	end
end

I believe this is because there is no code that actually runs the function

Where is the script for prompting the purchase?

everything works great, the prompt purchase pops up, it lets me purchase, but the problem is that the currency doesn’t go into your leaderstats

for i,v in pairs(GUI.RukonsPurchase:WaitForChild("List"):GetChildren()) do
	if v:IsA("TextButton") then
		v.MouseButton1Click:Connect(function()
			local ID = v:WaitForChild("ID").Value
			game:GetService("MarketplaceService"):PromptProductPurchase(plr, ID)
		end)
	end
end

Ok. How are you creating the leaderstats?

this is the leaderstat script

local stat = "Rukons"
local startamount = 0

local DataStore = game:GetService("DataStoreService")
local ds = DataStore:GetDataStore("LeaderStatSave")

game.Players.PlayerAdded:connect(function(player)
local leader = Instance.new("Folder",player)
local Cash = Instance.new("IntValue",leader)
leader.Name = "leaderstats"
Cash.Name = stat
Cash.Value = ds:GetAsync(player.UserId) or startamount
ds:SetAsync(player.UserId, Cash.Value)
Cash.Changed:connect(function()
ds:SetAsync(player.UserId, Cash.Value)
	end)
end)

game.Players.PlayerRemoving:connect(function(player)
ds:SetAsync(player.UserId, player.leaderstats.Rukons.Value)
end)