SeekPermissions.timesInitiated=0 SeekPermissions.Init=function()SeekPermissions.SetSeekPermissionsEvent.Event:Connect(SeekPermissions.SetSeekingPermissions)SeekPermissions.Players.PlayerRemoving:Connect(function(h)if SeekPermissions.PlayersWithPermission[h]then SeekPermissions.PlayersWithPermission[h]=nil end end)SeekPermissions.Players.PlayerAdded:Connect(function(h)if SeekPermissions.Players:FindFirstChild(h.Name)then SeekPermissions.CheckAndApplySeekPermissions(h)end end)SeekPermissions.timesInitiated+=1 end return SeekPermissions
-- strictly used for ServerSceneFramework test file due to conflict when replacing Init with a magic mock
SeekPermissions.timesInitiated = 0

SeekPermissions.Init = function()
	SeekPermissions.SetSeekPermissionsEvent.Event:Connect(SeekPermissions.SetSeekingPermissions)

	SeekPermissions.Players.PlayerRemoving:Connect(function(Player)
		if SeekPermissions.PlayersWithPermission[Player] then
			SeekPermissions.PlayersWithPermission[Player] = nil
		end
	end)

	SeekPermissions.Players.PlayerAdded:Connect(function(Player)
		-- Not sure if we need this conditional here
		if SeekPermissions.Players:FindFirstChild(Player.Name) then
			SeekPermissions.CheckAndApplySeekPermissions(Player)
		end
	end)

	SeekPermissions.timesInitiated += 1
end

return SeekPermissions
