How would i FireServer after someone has purchased dev product

the name is self-explanatory but how would I fireServer after someone has made a dev product purchase?

here’s the script

local MarketplaceService = game:GetService("MarketplaceService")
local productId = 1615053567

local button = script.Parent
local ReplicatedStorage = game.ReplicatedStorage

local MutatorEvent = ReplicatedStorage:WaitForChild("MutatorEvent")
local Mutator = workspace.Mutators.DoubleCoins
local ActiveRound = workspace.Round.ActiveRound

local player = game.Players.LocalPlayer
local money = player.datastats.Money
local cost = 0 -- set to zero so that when it fires the server, the server wont take away money

	if Mutator.Value == false and ActiveRound.Value == true and money.Value >= cost then
		MarketplaceService:PromptProductPurchase(player, productId)
		MutatorEvent:FireServer(Mutator, cost)
if MarketplaceService:UserOwnsGamePassAsync(player.UserId, productId) then
	MutatorEvent:FireServer(Mutator, cost)

the thing I want people to buy is a developer product so it can be purchased multiple times but that way only does game passes. But I found out that you can use process receipt to fire server…

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.