Hello so i got this short script right here and it works but i was wondering if it enables the gui if the player owns both gamepasses or does it enable the gui if the player owns one of the gamepasses:
local player = game.Players.LocalPlayer
if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(player.UserId, 766887852, 768155407) then
script.Parent.Parent.Enabled = true
else
script.Parent.Parent.Enabled = false
end
UserOwnsGamepassAsync only has two arguments that you should be using
UserId, and GamepassId.
You should be doing something like:
local player = game.Players.LocalPlayer
if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(player.UserId, 766887852) and game:GetService("MarketplaceService"):UserOwnsGamePassAsync(player.UserId, 768155407) then
script.Parent.Parent.Enabled = true
else
script.Parent.Parent.Enabled = false
end
the ‘and’ in the middle will help the code to understand that it says ‘if user owns this gamepass AND owns this gamepass, then do this!’