local access = {"players's name","players's name"} local gamepassid = 00 local Player = game.Players.LocalPlayer if game:GetService("MarketplaceService"):PlayerOwnsAsset(Player, gamepassid) or Player.Name == access then script.Parent.Visible = true else script.Parent.Select.Disabled = true script.Parent.Visible = false end
Did i do something wrong on the first line?
local access = {"players's name","players's name"} local gamepassid = 00 local Player = game.Players.LocalPlayer local authorized = false for i = 1, #access do --this checks if the local player's name is equal to any of the names in the table if access[i] == Player.Name then authorized = true --set authorized to true if the name is in the table break end end if game:GetService("MarketplaceService"):PlayerOwnsAsset(Player, gamepassid) or authorized then script.Parent.Visible = true else script.Parent.Select.Disabled = true script.Parent.Visible = false end