Parcel eCommerce logo
Parcel eCommerce logo

All articles

How to use the Product WhitelistUpdated 7 months ago

How to use Parcel Whitelist V1
In this guide, I’ll be explaining how you configure and use the Parcel Whitelist. Before we get started, please make sure that you have a configured Purchase Hub, otherwise you can’t further continue with this guide.

We also provide a step-by-step tutorial on our YouTube Channel now:
https://www.youtube.com/watch?v=0519ONcUVOM

Let’s get started:
Create a new product within your Hub and make sure that all the entered information is valid.

Find the HubID and ProductID
In order to find your hub ID, simply run the /products command in your Discord Server.
parcel-hubid

And to find the productID, simply run the /update <product name> command.
parcel-productid

Whitelist a product
Insert the following sample code into the script and add your own logic. We recommend you to add a function that destroys the entire model or game (workspace) if the owner doesn’t own the product license.

Sample code:

1local Parcel = require(9428572121)
2
3if Parcel:Whitelist("hub id here", "product id here") then
4 -- User owns the product
5else
6 -- User doesn’t own the product
7end
8

By default, the code checks if the game or group owner owns your product license. However, if you would like to change that, you can also pass a user id as a 3rd argument to :Whitelist.

Secure your code
In order to protect your code, we offer a Lua Obfuscator for all pro users:
https://support.parcelroblox.com/en-US/how-to-use-the-lua-obfuscator-369369 (Parcel Pro)

That’s all, you have now whitelisted your product.

Was this article helpful?
Yes
No