Is it possible to give discounts to specific gamepass holders?

I was thinking of having a VIP gamepass, and devproducts for both VIP and Non-VIP holders. Would I be allowed to create seperate devproducts for each of these, and prompt a different gamepass purchase depending on if they have the VIP gamepass or not?

Is this even possible?

Technically you can make a devproduct for any reason at all. If you want you can make a separate deproduct for VIP members and prompt them with that new ID if they are a VIP. But im pretty sure anyone can just run the prompt purchase so do checks on the server to make sure they are actually a VIP.

1 Like

Okay thank you! So, if I decided to prompt different purchases depending on VIP status, inside of the payment handler, would that work?

Would people be able to somehow bypass it though?

Technically you can bypass prompt purchase because its in a local script and just put in any ID rather then the ID you said. But because its sent to the server you can just check if the player actually has VIP. Here is a great article by roblox that should help you a bit.

Here’s the thing though technically if someone were to buy that devproduct they will waste their money because the server will never give them their item if they are not VIP. But if you return false roblox should? eventually give them back their money so everything should be fine.

So lets get some important notes down first because if you mess this up it will not be pretty.


productFunctions[968715607] = function(receipt, player)
if not vip then return false end -- If they do not have VIP return false 
 --- Give them their devproduct here
return true
end

Lets go down some more so you can understand. This code it from the article linked above

	local success, result = pcall(handler, receiptInfo, player)
	if not success or not result then -- If you return false  then this will happen
		warn("Error occurred while processing a product purchase")

			return Enum.ProductPurchaseDecision.NotProcessedYet
-- Roblox will understand that the purchase  has not been processed yet and I believe it will retry a few times before it will refund it but don't quote me on that. 
	end
	return Enum.ProductPurchaseDecision.PurchaseGranted -- Else if everything is fine it will return Purchase Granted and roblox will understand they were granted their product.

3 Likes

So if I return that it hasn’t been processed yet, I can technically decline the sale? I might try to test it out with some alts and a few robux to see if it fully refunds when I decline

I would like to know if it’s allowed by Roblox though.

Also, how do people get different devproducts to force a prompt, for example, you said "Technically you can bypass prompt purchase because its in a local script and just put in any ID rather then the ID you said. "

If the only way they can find out is by looking through the localscript somehow, would obfuscating it work?

What if I had some code on the receipt handler, so that it would give them the correct item/amount of money even if they purchased the wrong one(vip gets extra currency that they paid for, and non-vip buying a devproduct meant for VIP would get an equivalent non-vip value)

Example: If you have VIP 100 coins costs 25 robux, and if you don’t, it costs 35. If non-vip bypasses and pays the 25 robux one, am I allowed by roblox to only give them 72 coins, as thats equal to then non-vip rate?

The extra coins is a great idea I recommend that. But because Promt Purchase is run in local scripts and any exploiter has access to them. They can just change the ID to the VIP one. But your idea on giving VIP is alot better and I recommend it.

Also obfuscating isn’t security it just makes your life harder and there is no use at all other then making debugging hell.

1 Like

Okay sure! So would it be best to rename my devproducts to something like “100 Coins Package [150 for VIP]”, and in GUI’s show VIP gamepass holders that they’ll be getting 150?

Great option go for something like that.

1 Like