Knovon Hub Whitelist
Whitelist Snippet
Your whitelist snippet is available below. Please remember to fill in the productId and MainModel.
NOTE(s): We recommend to use the /whitelist
as It fills out your Hub Id Automatically!
Snippet
-- CONFIG BELOW
local MainModel = script
local ProductId = "" -- Product ID goes here
local HubId = "" -- Hub ID goes here (Hub ID is discord server ID (given at setup)
local RunService = game:GetService("RunService")
local module = require(9607406165)
function HttpCheck()
local http = pcall(function()
game:GetService('HttpService'):GetAsync('http://www.google.com/')
end)
return http
end
if RunService:IsStudio() then
warn("Knovon| Our products do not work in studio! This is for security reasons!")
MainModel:Destroy()
end
if HttpCheck() == false then
warn("Knovon | Please enable HTTP Requests for your Product to work!")
MainModel:Destroy()
return
end
local PlaceInfo = game:GetService("MarketplaceService"):GetProductInfo(game.PlaceId)
local gameOwner = nil
if game.CreatorType == Enum.CreatorType.Group then
gameOwner = game:GetService("GroupService"):GetGroupInfoAsync(PlaceInfo.Creator.CreatorTargetId).Owner.Id
else
gameOwner = game.CreatorId
end
local isWhitelisted = module.checkWhitelist(gameOwner, HubId, ProductId)
print(isWhitelisted)
if isWhitelisted == false then
warn("Knovon | User does not own Product!")
MainModel:Destroy()
return
end
-- Product Code here
Thank you
The Knovon Team!