I am wanting to create a script that allows players to purchase a dev prodcut, but every time they purchase it the price increases.
Example: The product may start at 100 Robux, and every time they purchase said product, 50 Robux will be added. So the second time they purchase the product it will cost 150 Robux, and so on.
Prompt Purchase Script
local MarketplaceService = game:GetService("MarketplaceService") local Players = game:GetService("Players") local productID = 500068534 script.Parent.MouseButton1Click:Connect(function() local player = Players.LocalPlayer MarketplaceService:PromptProductPurchase(player, productID) end)
Receipt Process Script
local MarketplaceService = game:GetService("MarketplaceService") local Product = game.ServerStorage.GamepassItems.Product MarketplaceService.ProcessReceipt = function(purchaseInfo) local Plr = game:GetService("Players"):GetPlayerByUserId(purchaseInfo.PlayerId) if purchaseInfo.ProductId == 500068534then local cloneProduct= Product:Clone() cloneProduct.Parent = Plr.Backpack end
These are the script I am currently using. Hope this makes some form of sense.