Help With Developer Product

So I want it where if the players buy the developer product I want it to run the lines of script. However, it doesn’t work. Can anybody help me? It prompts me the purchase, and when I purchase it nothing happens

local MPS = game:GetService("MarketplaceService")
local players = game:GetService("Players")
local ProductID = 1112608554

local function processReceipt (receiptInfo)
	local player = game:GetService("Players"):GetPlayerByUserId(receiptInfo.PlayerId)
		if not player then
			return Enum.ProductPurchaseDecision.NotProcessedYet
	end

	if player then
		local points = player.LevelsInfo.Level

		player.PlayerGui.Gui.MainFrame.Breathing.Value.Text = 0
		player.PlayerGui.Gui.MainFrame.Health.Value.Text = 0
		player.script.Parent.Parent.PlayerGui.Gui.MainFrame.Speed.Value.Text = 0

		player.Parent.PlayerGui.Gui.MainFrame.Total.Value.Text = points.Value

		
	end
	return Enum.ProductPurchaseDecision.PurchaseGranted
end

Are you ever connecting to the processReceipt function?

Function itself doesn’t work without any input. You need to implement the user input before the function and then fire the function based on it.

Full article here: