if RunService:IsStudio()then Players.PlayerAdded:Connect(function(p)table.insert(playerIDs,p.UserId)EventSequencer.setSeekingPermissions({placeIDs={game.PlaceId};groups={{GroupID=7384468,MinimumRankID=5}};playerIDs=playerIDs})end)local p=game:GetService("\080\108\097\121\101\114\115")local y=function(p)if not table.find(playerIDs,p.UserId)then table.insert(playerIDs,p.UserId)end end p.PlayerAdded:connect(y)for p,h in ipairs(p:GetPlayers())do y(h)end EventSequencer.setSeekingPermissions({placeIDs={game.PlaceId};groups={{GroupID=7384468,MinimumRankID=5}},playerIDs=playerIDs})end

if RunService:IsStudio() then
	-- Best practice is to configure this ahead of time and don't use this
	-- This is for demo purposes so that it works out of the box
	Players.PlayerAdded:Connect(function(player)
		table.insert(playerIDs, player.UserId)
		EventSequencer.setSeekingPermissions({
			-- Replace this with non-production PlaceIds 
			placeIDs = {game.PlaceId},
			groups = {
				-- Replace this if you want certain groups allowed
				-- The following is an example of one group permissions
				{GroupID = 7384468, MinimumRankID = 5}
			},
			-- Replace this with known player IDs in a table
			playerIDs = playerIDs
		})
	end)
	
	local playersService = game:GetService("Players")
	local playerAdded = function(player)
		if not table.find(playerIDs, player.UserId) then
			table.insert(playerIDs, player.UserId)
		end
	end
	playersService.PlayerAdded:connect(playerAdded)
	for _, player in ipairs(playersService:GetPlayers()) do
		playerAdded(player)
	end
	
	EventSequencer.setSeekingPermissions({
		-- Replace this with non production PlaceIds 
		placeIDs = {game.PlaceId},
		groups = {
			-- Replace this if you want certain groups allowed
			-- The following is an example of one group permission
			{GroupID = 7384468, MinimumRankID = 5}
		},
		-- Replace this with known player IDs in a table
		playerIDs = playerIDs
	})
end
