market = game:GetService("MarketplaceService") local marketPlace = game:GetService("MarketplaceService") marketPlace.ProcessReceipt = function(receipt) player = game.Players:GetPlayerByUserId(receipt.PlayerId) if receipt.CurrencySpent == 300 then --gravity if true then return Enum.ProductPurchaseDecision.PurchaseGranted end game.ServerStorage.GravityCoil:Clone().Parent = player:WaitForChild("Backpack") elseif receipt.CurrencySpent == 1 then if true then return Enum.ProductPurchaseDecision.PurchaseGranted end game.ServerStorage["Acceleration Coil"]:Clone().Parent = player:WaitForChild("Backpack") --speed end end
Process Receipt is for dev products gamepass's have different things i'd recomend you look through the marketplace api wiki but this is what you need PromptGamePassPurchaseFinished
Thanks!! This worked.
market = game:GetService("MarketplaceService") market.PromptGamePassPurchaseFinished:Connect(function(player, gamepass, purchase) if purchase == true then --gravity if gamepass == 6632153 then game.ServerStorage.GravityCoil:Clone().Parent = player.Backpack elseif gamepass == 6632270 then game.ServerStorage["Acceleration Coil"]:Clone().Parent = player.Backpack --speed end end end)