Admin Commands not working

So, im looking to make an admin commands gamepass for my simulator. I tried to use HD admin commands and they worked fine. Only downside was the fact that people could exploit it for access. I tried to then use khols admin but they dont have a gamepass feature in their script. Anyone know what admin commands are good for gamepass use?

Here is my script for the khols commands (does not work):

local gamePassId = (11143885)

game.Players.PlayerAdded:connect(function(player)
if game:GetService(“MarketplaceService”):UserOwnsGamePassAsync(player.userId, gamePassId) then
table.insert(VIP, player.Name)
end
end)

Hello! I see an error in the “table.insert()” method. Table.insert() requires 3 arguments (Table, Number Position, And value). It seems like you have to add a number position before the Value.

The table index is not a required value in table.insert(). If you don’t list one it assumes the index should be table.len+1.

Have you tried inserting print() statements to see if the if statement is working?

1 Like

I dont understand this.

Can you explain this a little better?

Add a print statement inside of your if statement so you know if your code is reaching that point of the script.

Inserted a print script, the print did not show up in the outcome.