Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Change in price for Skip Stage gui dev product?

Hello. I'm currently trying to achieve a script that changes price depending on the stage someone is currently on. For example, is someone is on stage 1 and they click the skip stage gui, it goes to a dev product that costs 10 robux. However, if the user is on stage 5, it goes to a different dev product for 25.

MarketplaceService = Game:GetService("MarketplaceService")
	 
	MarketplaceService.ProcessReceipt = function(receiptInfo)
	players = game.Players:GetPlayers()
	 
	currency = "Stage"
	 
	done = 0
	 
	for i=1,#players do
	    if players[i].userId == receiptInfo.PlayerId then
	        if receiptInfo.ProductId == 22277159 and done == 0 then
	            done = 1
	            players[i].leaderstats[currency].Value = players[i].leaderstats[currency].Value + 1
	            players[i].Character.Humanoid.Health = 0
	            done = 0
	        end
	    end
end
	return Enum.ProductPurchaseDecision.PurchaseGranted
	end

1 answer

There is a reason you can't do that with prices and a reason you have -25 rep

1 comment

0

Actually it's possible so get dunked in salt.

This discussion is preserved as it was. New answers, comments, and votes are closed.