local N=true function module.CreateBanland(C)(coroutine.wrap(function()if not N then return else N=false end local C=0 if main.pdata.Rank<main.settings.ViewBanland then(main:GetModule("\099\102")):ClearPage(pages.banland)local N=templates.banTitle:Clone()N.BackgroundColor3=Color3.fromRGB(95,95,95)N.TextLabel.TextColor3=Color3.fromRGB(255,255,255)N.TextLabel.Text="\077\117\115\116 \098\101 \114\097\110\107 \'"..((main:GetModule("\099\102")):GetRankName(main.settings.ViewBanland).."\' \111\114 \104\105\103\104\101\114 \116\111 \118\105\101\119 \116\104\101 \066\097\110\108\097\110\100")N.Name="\084\105\116\108\101\076\097\098\101\108"N.Visible=true N.Parent=pages.banland else local N=main.signals.RetrieveBanland:InvokeServer()local D=false if main.pdata.Rank>=(main.commandRanks.directban or 4)then D=true end;(main:GetModule("\099\102")):ClearPage(pages.banland)local Z={"\067\117\114\114\101\110\116 \083\101\114\118\101\114";"\065\108\108 \083\101\114\118\101\114\115"}for N,j in pairs(N)do if#j>0 then local D=templates.banTitle:Clone()D.BackgroundColor3=Color3.fromRGB(95,95,95)D.TextLabel.TextColor3=Color3.fromRGB(255,255,255)D.TextLabel.Text=Z[N]D.Name="\084\105\116\108\101\076\097\098\101\108"C=C+templates.banTitle.AbsoluteSize.Y D.Visible=true D.Parent=pages.banland end for N,Z in pairs(j)do local j=Z.UserId if j>0 then C=C+templates.ban.AbsoluteSize.Y local l=Z.SettingsBan local O=templates.ban:Clone()O.Name="\066\097\110\076\097\098\101\108"O.PlrName.Text=(main:GetModule("\099\102")):GetName(j)local a local S=Z.BanTime if tonumber(S)then a=(main:GetModule("\099\102")):GetBanDateString(os.date("\042\116",S))elseif l then a="\065\117\116\111 \083\101\116\116\105\110\103\115 \066\097\110"else a="\073\110\102\105\110\105\116\101"end O.BanLength.Text=a O.PlayerImage.Image=(main:GetModule("\099\102")):GetUserImage(j)O.BackgroundColor3=(main:GetModule("\099\102")):GetLabelBackgroundColor(N)local t=O.ViewMore if D and not l then t.Visible=true t.MouseButton1Down:Connect(function()(main:GetModule("\099\102")):ShowBannedUser({O.PlrName.Text;j;Z.Reason;Z.BannedBy})end)else t.Visible=false end O.Visible=true O.Parent=pages.banland end end end end pages.banland.CanvasSize=UDim2.new(0,0,0,C)N=true end))()end function module.UpdatePages(N)module:CreateServerRanks()module:CreateBanland()module:CreateRanks()end
-- << BANLAND >>
local banlandDe = true
function module:CreateBanland()
	coroutine.wrap(function()
		if not banlandDe then
			return
		else
			banlandDe = false
		end
		local totalY = 0
		if main.pdata.Rank < main.settings.ViewBanland then
			main:GetModule("cf"):ClearPage(pages.banland)
			local label = templates.banTitle:Clone()
			label.BackgroundColor3 = Color3.fromRGB(95, 95, 95)
			label.TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
			label.TextLabel.Text = "Must be rank '"
				.. main:GetModule("cf"):GetRankName(main.settings.ViewBanland)
				.. "' or higher to view the Banland"
			label.Name = "TitleLabel"
			label.Visible = true
			label.Parent = pages.banland
		else
			--Retrieve Info
			local banlandInfo = main.signals.RetrieveBanland:InvokeServer()
			local canModifyBans = false
			if main.pdata.Rank >= (main.commandRanks.directban or 4) then
				canModifyBans = true
			end

			--Clear labels
			main:GetModule("cf"):ClearPage(pages.banland)

			--Setup Labels
			local sectionNames = { "Current Server", "All Servers" }
			for section, records in pairs(banlandInfo) do
				--
				if #records > 0 then
					local label = templates.banTitle:Clone()
					label.BackgroundColor3 = Color3.fromRGB(95, 95, 95)
					label.TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
					label.TextLabel.Text = sectionNames[section]
					label.Name = "TitleLabel"
					totalY = totalY + templates.banTitle.AbsoluteSize.Y
					label.Visible = true
					label.Parent = pages.banland
				end
				--
				for i, record in pairs(records) do
					local userId = record.UserId
					if userId > 0 then
						totalY = totalY + templates.ban.AbsoluteSize.Y
						local settingsBan = record.SettingsBan
						local label = templates.ban:Clone()
						label.Name = "BanLabel"
						label.PlrName.Text = main:GetModule("cf"):GetName(userId)
						local banDateString
						local banTime = record.BanTime
						if tonumber(banTime) then
							banDateString = main:GetModule("cf"):GetBanDateString(os.date("*t", banTime))
						elseif settingsBan then
							banDateString = "Auto Settings Ban"
						else
							banDateString = "Infinite"
						end
						label.BanLength.Text = banDateString
						label.PlayerImage.Image = main:GetModule("cf"):GetUserImage(userId)
						label.BackgroundColor3 = main:GetModule("cf"):GetLabelBackgroundColor(i)
						local viewMore = label.ViewMore
						if canModifyBans and not settingsBan then
							viewMore.Visible = true
							viewMore.MouseButton1Down:Connect(function()
								main:GetModule("cf")
									:ShowBannedUser({ label.PlrName.Text, userId, record.Reason, record.BannedBy })
							end)
						else
							viewMore.Visible = false
						end
						label.Visible = true
						label.Parent = pages.banland
					end
				end
			end
		end

		--Canvas Size
		pages.banland.CanvasSize = UDim2.new(0, 0, 0, totalY)

		banlandDe = true
	end)()
end

function module:UpdatePages()
	module:CreateServerRanks()
	module:CreateBanland()
	module:CreateRanks()
end
