Detection Script Checking 3 Things

I’ve made a script which checks if someone has leaked your model and it sends a webhook to a channel in Discord. The only problem is that now I need to make a whitelisted user list which if a user ID is entered in that list, it won’t send the webhook.

The problem is that it simply isnt sending the webhook.

You have two potential approaches, you could either use an array or a dictionary.

--ARRAY
local Whitelist = {1, 2, 3}
if not table.find(Whitelist, UserId) then

--DICTIONARY
local Whitelist = {
	[1] = true,
	[2] = true,
	[3] = true
}

if not Whitelist[UserId] then
2 Likes

For troubleshooting just print plr.UserId and ownerId before this line to see why the statement is or isn’t true

	if plr.UserId == ownerId then
2 Likes

you can try

if plr.UserId == ownerId and not table.find(WhitelistUserIDs,plr.UserId) then
2 Likes