--[[
	// Name:   Extended GroupService
	// Author: Sebastian Erik Bauer (SimplyData)
	// Date:   25/04/2019
--]]

local GroupService = {}
local RbxGroupService = game:GetService("GroupService")

local DEFAULT_ROLE = "Guest"

local function PagesToArray(Pages)
	local Array = {}
	local Length = 0

	while true do
		for _, Value in ipairs(Pages:GetCurrentPage()) do
			Length = Length + 1
			Array[Length] = Value
		end

		if Pages.IsFinished then
			break
		else
			Pages:AdvanceToNextPageAsync()
		end
	end

	return Array
end
