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:

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.

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

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)
3if Parcel:Whitelist("hub id here", "product id here") then
4 -- User owns the product
6 -- User doesn’t own the product

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: (Parcel Pro)

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

Was this article helpful?