local a=_G.HDAdminMain local G=a.gui.CmdBar local h={maxSuggestions=5,mainParent=G,textBox=G.SearchFrame.TextBox;rframe=G.ResultsFrame;suggestionPos=1,suggestionDisplayed=0;forceExecute=false;highlightColor=Color3.fromRGB(50,50,50);otherColor=Color3.fromRGB(80,80,80);suggestionLabels={};currentBarCommand=nil}G.Visible=false local function J(G)local h=nil local J=""h=G.suggestionLabels["\076\097\098\101\108"..G.suggestionPos]if G.specificArg then local a=h.Name.." "G.textBox.Text=a;(coroutine.wrap(function()for a=1,10,1 do G.textBox:ReleaseFocus()wait()end end))()wait()G.textBox.Text=a return end local e=string.sub(G.textBox.Text,1,1)local m=-1 local N={}G.textBox.Text:gsub("\040\091\094"..(a.pdata.SplitKey.."\093\043\041"),function(a)m=m+1 if h.ArgPos-1<m then return end table.insert(N,a.." ")end)if m==0 and(e==a.settings.UniversalPrefix or e==a.pdata.Prefix)then J=e end local b=((J..table.concat(N,""))..h.Name)..a.pdata.SplitKey G.textBox.Text=b wait()G.textBox.Text=b G.textBox:CaptureFocus()G.textBox.CursorPosition=#b+1 end local e={}local m={}local function N(a)local G=a.maxSuggestions local h=0 while true do local e=a.rframe.LabelTemplate:Clone()e.Name="\076\097\098\101\108"..h e.Visible=false e.Parent=a.rframe local m=h e.MouseEnter:Connect(function()a.suggestionPos=m end)e.MouseButton1Up:Connect(function()a.suggestionPos=m J(a)end)if true then if not(m<G)then break end elseif not(G<m)then break end m=m+1 end end local function b(G)G.textBox.FocusLost:connect(function(h)if G.mainParent.Name~="\067\109\100\066\097\114"or G.specificArg then if G.suggestionDisplayed>0 then J(G,G.specificArg)return end else if G.suggestionDisplayed>0 and(not forceExecute and a.device~="\077\111\098\105\108\101")then J(G)return end if h then if forceExecute then J(G)end e:CloseCmdBar()if#G.textBox.Text>1 then local h=G.textBox.Text local J=string.sub(h,1,1)if J~=a.settings.UniversalPrefix and J~=a.pdata.Prefix then h=a.pdata.Prefix..h end if string.sub(h,-1)==" "then h=string.sub(h,1,-1)end a.signals.RequestCommand:InvokeServer(h)end end end end)end function e.SetupTextbox(G,h,J)m[h]=J N(J)b(J)local e=J.specificArg local function o(a,G,h,e)if string.sub(string.lower(e),1,#G)==G then table.insert(a,{Name=e,ArgPos=h})if#a~=J.maxSuggestions then return end else return end return true end local k=nil J.textBox.Changed:connect(function(G)if G=="\084\101\120\116"then local G=nil G={}if e then table.insert(G,J.textBox.Text)else local h=-1 local e=nil J.textBox.Text:gsub("\040\091\094"..(a.pdata.SplitKey.."\093\043\041"),function(a)h=h+1 if h==0 then e=a return end if h>0 then table.insert(G,a)end end)if h>0 and not J.currentBarCommand then local G=string.sub(e,1,1)if G==a.settings.UniversalPrefix or G==a.pdata.Prefix then e=string.sub(e,2)end e=string.lower(e)for a,G in pairs(a.commandInfo)do if string.lower(G.Name)==e then J.currentBarCommand=G elseif G.Aliases then for a,h in pairs(G.Aliases)do if string.lower(h)==e then J.currentBarCommand=G end end end end elseif h<=0 then J.currentBarCommand=nil end end local h={}J.suggestionPos=1 if#J.textBox.Text>1 or e and#J.textBox.Text>0 then if u12==0 then local G=string.lower(string.sub(J.textBox.Text,2))local e=string.lower(string.sub(J.textBox.Text,1,1))local m,N,b=pairs(a.commandInfo)while true do local a,o=m(N,b)if not a then break end local k=o.Prefixes[1]if string.sub(string.lower(o.Name),1,#G)==G and k==e then table.insert(h,{Name=o.Name,Args=o.Args;Prefixes=o.Prefixes;ArgPos=0})if#h==J.maxSuggestions then break end end local d=o.UnFunction if d and(string.sub(string.lower(d),1,#G)==G and k==e)then table.insert(h,{Name=d,Args={},Prefixes=o.Prefixes;ArgPos=0})if#h==J.maxSuggestions then break end end end elseif J.currentBarCommand or e then if e then local a=e else v31=J.currentBarCommand.Args[u12]end local m={}local N=string.lower(G[u12])local b=string.sub(J.textBox.Text,-1)if b~=" "and b~=a.pdata.SplitKey then if v31=="\112\108\097\121\101\114"or v31=="\112\108\097\121\101\114\097\114\103"then for a,G in pairs(a.qualifiers)do if o(h,N,u12,G)then break end end if#h<J.maxSuggestions then for a,G in pairs(a.players:GetChildren())do if o(h,N,u12,G.Name)then break end end end elseif v31=="\099\111\108\111\117\114"or v31=="\099\111\108\111\114"or v31=="\099\111\108\111\114\051"then for a,G in pairs(a.colors)do if o(h,N,u12,G)then break end end elseif v31=="\109\097\116\101\114\105\097\108"then for a,G in pairs(a.materials)do if o(h,N,u12,G)then break end end elseif v31=="\114\097\110\107"then for a,G in pairs(a.settings.Ranks)do if o(h,N,u12,G[2])then break end end elseif v31=="\116\101\097\109"or v31=="\116\101\097\109\099\111\108\111\114"then local G=a.teams local J,e,m=pairs(G.GetChildren(G))while true do local a,G=J(e,m)if not a then break end m=a if o(h,N,u12,G.Name)then break end end elseif v31=="\109\111\114\112\104"then local G,J,e=pairs(a.morphNames)while true do local a,m=G(J,e)if not a then break end e=a if o(h,N,u12,a)then break end end elseif v31=="\116\111\111\108\115"or v31=="\103\101\097\114\115"or v31=="\116\111\111\108"or v31=="\103\101\097\114"then local G,J,e=pairs(a.toolNames)while true do local a,m=G(J,e)if not a then break end e=a if o(h,N,u12,a)then break end end end end end end J.suggestionDisplayed=#h if J.currentBarCommand and(#J.currentBarCommand.Args==u12 and J.suggestionDisplayed>0)then forceExecute=true else forceExecute=false end for G=1,J.maxSuggestions,1 do local e=h[G]local m=J.rframe["\076\097\098\101\108"..G]if e then local h=false if e.Args then h=true end local N=false if h and e.Prefixes[1]==a.settings.UniversalPrefix then N=true end local b={}if h then for a,G in pairs(e.Args)do if not N or G~="\112\108\097\121\101\114"or G=="\112\108\097\121\101\114\097\114\103"then table.insert(b,"\060"..(G.."\062"))end end end m.TextLabel.Text=e.Name..(" "..table.concat(b," "))if G==J.suggestionPos then m.BackgroundColor3=J.highlightColor else m.BackgroundColor3=J.otherColor end J.suggestionLabels["\076\097\098\101\108"..G]=e if J.mainParent.Name~="\067\109\100\066\097\114"then local h=J.rframe.LabelTemplate.AbsoluteSize.Y if a.gui.Notices.AbsoluteSize.Y<(J.rframe.AbsolutePosition.Y+h*G)+5 then if not k then k=J.mainParent.Position end J.mainParent.Position=J.mainParent.Position-UDim2.new(0,0,0,h)end end m.Visible=true else m.Visible=false end end if k and#h<1 then J.mainParent.Position=k k=nil end if#h<1 and J.mainParent.Name~="\067\109\100\066\097\114"then J.mainParent.ClipsDescendants=true else J.mainParent.ClipsDescendants=false end end end)end e:SetupTextbox("\099\109\100\098\097\114\049",h)function e.ToggleBar(G,h)if h==Enum.KeyCode.Quote then if a.gui.CmdBar.Visible then(a:GetModule("\067\109\100\066\097\114")):CloseCmdBar()return else(a:GetModule("\067\109\100\066\097\114")):OpenCmdBar()return end end if h==Enum.KeyCode.Semicolon then local G=a.settings.Cmdbar2 if a.pdata.Rank>0 or G<=0 then if a.pdata.Rank<G then local h=(a:GetModule("\099\102")):FormatNotice("\067\111\109\109\097\110\100\066\097\114\076\111\099\107\101\100","\050",(a:GetModule("\099\102")):GetRankName(G));(a:GetModule("\078\111\116\105\099\101\115")):Notice("\069\114\114\111\114",h[1],h[2])return end local h=m.cmdbar2 if not h then(a:GetModule("\067\108\105\101\110\116\067\111\109\109\097\110\100\115")).cmdbar2.Function()return end if h.mainParent.Visible then h.mainParent.Visible=false return end h.mainParent.Visible=true end end end local o={"\067\104\097\116";"\080\108\097\121\101\114\076\105\115\116"}local k={}local d=a.gui.CustomTopBar local r=1 local M=true function e.OpenCmdBar(J)local e=a.settings.Cmdbar if a.pdata.Rank>0 or e<=0 then if a.pdata.Rank<e then local G=(a:GetModule("\099\102")):FormatNotice("\067\111\109\109\097\110\100\066\097\114\076\111\099\107\101\100","",(a:GetModule("\099\102")):GetRankName(e));(a:GetModule("\078\111\116\105\099\101\115")):Notice("\069\114\114\111\114",G[1],G[2])return end h.textBox:CaptureFocus()for G,h in pairs(o)do k[h]=a.starterGui:GetCoreGuiEnabled(h)a.starterGui:SetCoreGuiEnabled(Enum.CoreGuiType[h],false)end d.BackgroundColor3=Color3.fromRGB(50,50,50)r=d.BackgroundTransparency M=d.Visible d.BackgroundTransparency=0 d.Visible=true h.textBox.Text=""G.Visible=true wait()h.textBox.Text=a.pdata.Prefix h.textBox.CursorPosition=3 end end function e.CloseCmdBar(J)G.Visible=false for G,h in pairs(o)do local J=k[h]if J then a.starterGui:SetCoreGuiEnabled(Enum.CoreGuiType[h],J)end end d.BackgroundColor3=Color3.fromRGB(31,31,31)d.BackgroundTransparency=r d.Visible=M;(coroutine.wrap(function()for a=1,10,1 do h.textBox:ReleaseFocus()wait()end end))()end function e.PressedArrowKey(a,G)for a,h in pairs(m)do if h.mainParent.Visible and h.textBox:IsFocused()then local a=h.rframe:FindFirstChild("\076\097\098\101\108"..h.suggestionPos)if G==Enum.KeyCode.Down then h.suggestionPos=h.suggestionPos+1 if h.suggestionDisplayed<h.suggestionPos then h.suggestionPos=1 end elseif G==Enum.KeyCode.Up then h.suggestionPos=h.suggestionPos-1 if h.suggestionPos<1 then h.suggestionPos=h.suggestionDisplayed end elseif G==Enum.KeyCode.Right then J(h)end local e=h.rframe["\076\097\098\101\108"..h.suggestionPos]if e~=a then a.BackgroundColor3=h.otherColor e.BackgroundColor3=h.highlightColor end end end end return e


local l__HDAdminMain__1 = _G.HDAdminMain;
local l__CmdBar__2 = l__HDAdminMain__1.gui.CmdBar;
local v3 = {
	maxSuggestions = 5, 
	mainParent = l__CmdBar__2, 
	textBox = l__CmdBar__2.SearchFrame.TextBox, 
	rframe = l__CmdBar__2.ResultsFrame, 
	suggestionPos = 1, 
	suggestionDisplayed = 0, 
	forceExecute = false, 
	highlightColor = Color3.fromRGB(50, 50, 50), 
	otherColor = Color3.fromRGB(80, 80, 80), 
	suggestionLabels = {}, 
	currentBarCommand = nil
};
l__CmdBar__2.Visible = false;
local function u1(p1)
	local v4 = nil;
	local v5 = "";
	v4 = p1.suggestionLabels["Label" .. p1.suggestionPos];
	if p1.specificArg then
		local v6 = v4.Name .. " ";
		p1.textBox.Text = v6;
		coroutine.wrap(function()
			for v7 = 1, 10 do
				p1.textBox:ReleaseFocus();
				wait();
			end;
		end)();
		wait();
		p1.textBox.Text = v6;
		return;
	end;
	local v8 = string.sub(p1.textBox.Text, 1, 1);
	local u2 = -1;
	local u3 = {};
	p1.textBox.Text:gsub("([^" .. l__HDAdminMain__1.pdata.SplitKey .. "]+)", function(p2)
		u2 = u2 + 1;
		if v4.ArgPos - 1 < u2 then
			return;
		end;
		table.insert(u3, p2 .. " ");
	end);
	if u2 == 0 and (v8 == l__HDAdminMain__1.settings.UniversalPrefix or v8 == l__HDAdminMain__1.pdata.Prefix) then
		v5 = v8;
	end;
	local v9 = ((v5 .. table.concat(u3, "")) .. v4.Name) .. l__HDAdminMain__1.pdata.SplitKey;
	p1.textBox.Text = v9;
	wait();
	p1.textBox.Text = v9;
	p1.textBox:CaptureFocus();
	p1.textBox.CursorPosition = #v9 + 1;
end;
local u4 = {};
local u5 = {};
local function u6(p3)
	local l__maxSuggestions__10 = p3.maxSuggestions;
	local v11 = 1 - 1;
	while true do
		local v12 = p3.rframe.LabelTemplate:Clone();
		v12.Name = "Label" .. v11;
		v12.Visible = false;
		v12.Parent = p3.rframe;
		local u7 = v11;
		v12.MouseEnter:Connect(function()
			p3.suggestionPos = u7;
		end);
		v12.MouseButton1Up:Connect(function()
			p3.suggestionPos = u7;
			u1(p3);
		end);
		if 0 <= 1 then
			if not (u7 < l__maxSuggestions__10) then
				break;
			end;
		elseif not (l__maxSuggestions__10 < u7) then
			break;
		end;
		u7 = u7 + 1;	
	end;
end;
local function u8(p4)
	p4.textBox.FocusLost:connect(function(p5)
		if p4.mainParent.Name ~= "CmdBar" or p4.specificArg then
			if p4.suggestionDisplayed > 0 then
				u1(p4, p4.specificArg);
				return;
			end;
		else
			if p4.suggestionDisplayed > 0 and not forceExecute and l__HDAdminMain__1.device ~= "Mobile" then
				u1(p4);
				return;
			end;
			if p5 then
				if forceExecute then
					u1(p4);
				end;
				u4:CloseCmdBar();
				if #p4.textBox.Text > 1 then
					local v13 = p4.textBox.Text;
					local v14 = string.sub(v13, 1, 1);
					if v14 ~= l__HDAdminMain__1.settings.UniversalPrefix and v14 ~= l__HDAdminMain__1.pdata.Prefix then
						v13 = l__HDAdminMain__1.pdata.Prefix .. v13;
					end;
					if string.sub(v13, -1) == " " then
						v13 = string.sub(v13, 1, -1);
					end;
					l__HDAdminMain__1.signals.RequestCommand:InvokeServer(v13);
				end;
			end;
		end;
	end);
end;
function u4.SetupTextbox(p6, p7, p8)
	u5[p7] = p8;
	u6(p8);
	u8(p8);
	local l__specificArg__9 = p8.specificArg;
	local function u10(p9, p10, p11, p12)
		if string.sub(string.lower(p12), 1, #p10) == p10 then
			table.insert(p9, {
				Name = p12, 
				ArgPos = p11
			});
			if #p9 ~= p8.maxSuggestions then
				return;
			end;
		else
			return;
		end;
		return true;
	end;
	local u11 = nil;
	p8.textBox.Changed:connect(function(p13)
		if p13 == "Text" then
			local v15 = nil;
			v15 = {};
			if l__specificArg__9 then
				table.insert(v15, p8.textBox.Text);
			else
				local u12 = -1;
				local u13 = nil;
				p8.textBox.Text:gsub("([^" .. l__HDAdminMain__1.pdata.SplitKey .. "]+)", function(p14)
					u12 = u12 + 1;
					if u12 == 0 then
						u13 = p14;
						return;
					end;
					if u12 > 0 then
						table.insert(v15, p14);
					end;
				end);
				if u12 > 0 and not p8.currentBarCommand then
					local v16 = string.sub(u13, 1, 1);
					if v16 == l__HDAdminMain__1.settings.UniversalPrefix or v16 == l__HDAdminMain__1.pdata.Prefix then
						u13 = string.sub(u13, 2);
					end;
					u13 = string.lower(u13);
					for v17, v18 in pairs(l__HDAdminMain__1.commandInfo) do
						if string.lower(v18.Name) == u13 then
							p8.currentBarCommand = v18;
						elseif v18.Aliases then
							for v19, v20 in pairs(v18.Aliases) do
								if string.lower(v20) == u13 then
									p8.currentBarCommand = v18;
								end;
							end;
						end;
					end;
				elseif u12 <= 0 then
					p8.currentBarCommand = nil;
				end;
			end;
			local v21 = {};
			p8.suggestionPos = 1;
			if #p8.textBox.Text > 1 or l__specificArg__9 and #p8.textBox.Text > 0 then
				if u12 == 0 then
					local v22 = string.lower(string.sub(p8.textBox.Text, 2));
					local v23 = string.lower(string.sub(p8.textBox.Text, 1, 1));
					local v24, v25, v26 = pairs(l__HDAdminMain__1.commandInfo);
					while true do
						local v27, v28 = v24(v25, v26);
						if not v27 then
							break;
						end;
						local v29 = v28.Prefixes[1];
						if string.sub(string.lower(v28.Name), 1, #v22) == v22 and v29 == v23 then
							table.insert(v21, {
								Name = v28.Name, 
								Args = v28.Args, 
								Prefixes = v28.Prefixes, 
								ArgPos = 0
							});
							if #v21 == p8.maxSuggestions then
								break;
							end;
						end;
						local l__UnFunction__30 = v28.UnFunction;
						if l__UnFunction__30 and (string.sub(string.lower(l__UnFunction__30), 1, #v22) == v22 and v29 == v23) then
							table.insert(v21, {
								Name = l__UnFunction__30, 
								Args = {}, 
								Prefixes = v28.Prefixes, 
								ArgPos = 0
							});
							if #v21 == p8.maxSuggestions then
								break;
							end;
						end;					
					end;
				elseif p8.currentBarCommand or l__specificArg__9 then
					if l__specificArg__9 then
						local v31 = l__specificArg__9;
					else
						v31 = p8.currentBarCommand.Args[u12];
					end;
					local v32 = {};
					local v33 = string.lower(v15[u12]);
					local v34 = string.sub(p8.textBox.Text, -1);
					if v34 ~= " " and v34 ~= l__HDAdminMain__1.pdata.SplitKey then
						if v31 == "player" or v31 == "playerarg" then
							for v35, v36 in pairs(l__HDAdminMain__1.qualifiers) do
								if u10(v21, v33, u12, v36) then
									break;
								end;
							end;
							if #v21 < p8.maxSuggestions then
								for v37, v38 in pairs(l__HDAdminMain__1.players:GetChildren()) do
									if u10(v21, v33, u12, v38.Name) then
										break;
									end;
								end;
							end;
						elseif v31 == "colour" or v31 == "color" or v31 == "color3" then
							for v39, v40 in pairs(l__HDAdminMain__1.colors) do
								if u10(v21, v33, u12, v40) then
									break;
								end;
							end;
						elseif v31 == "material" then
							for v41, v42 in pairs(l__HDAdminMain__1.materials) do
								if u10(v21, v33, u12, v42) then
									break;
								end;
							end;
						elseif v31 == "rank" then
							for v43, v44 in pairs(l__HDAdminMain__1.settings.Ranks) do
								if u10(v21, v33, u12, v44[2]) then
									break;
								end;
							end;
						elseif v31 == "team" or v31 == "teamcolor" then
							local l__teams__45 = l__HDAdminMain__1.teams;
							local v46, v47, v48 = pairs(l__teams__45.GetChildren(l__teams__45));
							while true do
								local v49, v50 = v46(v47, v48);
								if not v49 then
									break;
								end;
								v48 = v49;
								if u10(v21, v33, u12, v50.Name) then
									break;
								end;							
							end;
						elseif v31 == "morph" then
							local v51, v52, v53 = pairs(l__HDAdminMain__1.morphNames);
							while true do
								local v54, v55 = v51(v52, v53);
								if not v54 then
									break;
								end;
								v53 = v54;
								if u10(v21, v33, u12, v54) then
									break;
								end;							
							end;
						elseif v31 == "tools" or v31 == "gears" or v31 == "tool" or v31 == "gear" then
							local v56, v57, v58 = pairs(l__HDAdminMain__1.toolNames);
							while true do
								local v59, v60 = v56(v57, v58);
								if not v59 then
									break;
								end;
								v58 = v59;
								if u10(v21, v33, u12, v59) then
									break;
								end;							
							end;
						end;
					end;
				end;
			end;
			p8.suggestionDisplayed = #v21;
			if p8.currentBarCommand and #p8.currentBarCommand.Args == u12 and p8.suggestionDisplayed > 0 then
				forceExecute = true;
			else
				forceExecute = false;
			end;
			for v61 = 1, p8.maxSuggestions do
				local v62 = v21[v61];
				local v63 = p8.rframe["Label" .. v61];
				if v62 then
					local v64 = false;
					if v62.Args then
						v64 = true;
					end;
					local v65 = false;
					if v64 and v62.Prefixes[1] == l__HDAdminMain__1.settings.UniversalPrefix then
						v65 = true;
					end;
					local v66 = {};
					if v64 then
						for v67, v68 in pairs(v62.Args) do
							if not v65 or v68 ~= "player" or v68 == "playerarg" then
								table.insert(v66, "<" .. v68 .. ">");
							end;
						end;
					end;
					v63.TextLabel.Text = v62.Name .. " " .. table.concat(v66, " ");
					if v61 == p8.suggestionPos then
						v63.BackgroundColor3 = p8.highlightColor;
					else
						v63.BackgroundColor3 = p8.otherColor;
					end;
					p8.suggestionLabels["Label" .. v61] = v62;
					if p8.mainParent.Name ~= "CmdBar" then
						local l__Y__69 = p8.rframe.LabelTemplate.AbsoluteSize.Y;
						if l__HDAdminMain__1.gui.Notices.AbsoluteSize.Y < p8.rframe.AbsolutePosition.Y + l__Y__69 * v61 + 5 then
							if not u11 then
								u11 = p8.mainParent.Position;
							end;
							p8.mainParent.Position = p8.mainParent.Position - UDim2.new(0, 0, 0, l__Y__69);
						end;
					end;
					v63.Visible = true;
				else
					v63.Visible = false;
				end;
			end;
			if u11 and #v21 < 1 then
				p8.mainParent.Position = u11;
				u11 = nil;
			end;
			if #v21 < 1 and p8.mainParent.Name ~= "CmdBar" then
				p8.mainParent.ClipsDescendants = true;
			else
				p8.mainParent.ClipsDescendants = false;
			end;
		end;
	end);
end;
u4:SetupTextbox("cmdbar1", v3);
function u4.ToggleBar(p15, p16)
	if p16 == Enum.KeyCode.Quote then
		if l__HDAdminMain__1.gui.CmdBar.Visible then
			l__HDAdminMain__1:GetModule("CmdBar"):CloseCmdBar();
			return;
		else
			l__HDAdminMain__1:GetModule("CmdBar"):OpenCmdBar();
			return;
		end;
	end;
	if p16 == Enum.KeyCode.Semicolon then
		local l__Cmdbar2__70 = l__HDAdminMain__1.settings.Cmdbar2;
		if l__HDAdminMain__1.pdata.Rank > 0 or l__Cmdbar2__70 <= 0 then
			if l__HDAdminMain__1.pdata.Rank < l__Cmdbar2__70 then
				local v71 = l__HDAdminMain__1:GetModule("cf"):FormatNotice("CommandBarLocked", "2", l__HDAdminMain__1:GetModule("cf"):GetRankName(l__Cmdbar2__70));
				l__HDAdminMain__1:GetModule("Notices"):Notice("Error", v71[1], v71[2]);
				return;
			end;
			local l__cmdbar2__72 = u5.cmdbar2;
			if not l__cmdbar2__72 then
				l__HDAdminMain__1:GetModule("ClientCommands").cmdbar2.Function();
				return;
			end;
			if l__cmdbar2__72.mainParent.Visible then
				l__cmdbar2__72.mainParent.Visible = false;
				return;
			end;
			l__cmdbar2__72.mainParent.Visible = true;
		end;
	end;
end;
local u14 = { "Chat", "PlayerList" };
local u15 = {};
local l__CustomTopBar__16 = l__HDAdminMain__1.gui.CustomTopBar;
local u17 = 1;
local u18 = true;
function u4.OpenCmdBar(p17)
	local l__Cmdbar__73 = l__HDAdminMain__1.settings.Cmdbar;
	if l__HDAdminMain__1.pdata.Rank > 0 or l__Cmdbar__73 <= 0 then
		if l__HDAdminMain__1.pdata.Rank < l__Cmdbar__73 then
			local v74 = l__HDAdminMain__1:GetModule("cf"):FormatNotice("CommandBarLocked", "", l__HDAdminMain__1:GetModule("cf"):GetRankName(l__Cmdbar__73));
			l__HDAdminMain__1:GetModule("Notices"):Notice("Error", v74[1], v74[2]);
			return;
		end;
		v3.textBox:CaptureFocus();
		for v75, v76 in pairs(u14) do
			u15[v76] = l__HDAdminMain__1.starterGui:GetCoreGuiEnabled(v76);
			l__HDAdminMain__1.starterGui:SetCoreGuiEnabled(Enum.CoreGuiType[v76], false);
		end;
		l__CustomTopBar__16.BackgroundColor3 = Color3.fromRGB(50, 50, 50);
		u17 = l__CustomTopBar__16.BackgroundTransparency;
		u18 = l__CustomTopBar__16.Visible;
		l__CustomTopBar__16.BackgroundTransparency = 0;
		l__CustomTopBar__16.Visible = true;
		v3.textBox.Text = "";
		l__CmdBar__2.Visible = true;
		wait();
		v3.textBox.Text = l__HDAdminMain__1.pdata.Prefix;
		v3.textBox.CursorPosition = 3;
	end;
end;
function u4.CloseCmdBar(p18)
	l__CmdBar__2.Visible = false;
	for v77, v78 in pairs(u14) do
		local v79 = u15[v78];
		if v79 then
			l__HDAdminMain__1.starterGui:SetCoreGuiEnabled(Enum.CoreGuiType[v78], v79);
		end;
	end;
	l__CustomTopBar__16.BackgroundColor3 = Color3.fromRGB(31, 31, 31);
	l__CustomTopBar__16.BackgroundTransparency = u17;
	l__CustomTopBar__16.Visible = u18;
	coroutine.wrap(function()
		for v80 = 1, 10 do
			v3.textBox:ReleaseFocus();
			wait();
		end;
	end)();
end;
function u4.PressedArrowKey(p19, p20)
	for v81, v82 in pairs(u5) do
		if v82.mainParent.Visible and v82.textBox:IsFocused() then
			local v83 = v82.rframe:FindFirstChild("Label" .. v82.suggestionPos);
			if p20 == Enum.KeyCode.Down then
				v82.suggestionPos = v82.suggestionPos + 1;
				if v82.suggestionDisplayed < v82.suggestionPos then
					v82.suggestionPos = 1;
				end;
			elseif p20 == Enum.KeyCode.Up then
				v82.suggestionPos = v82.suggestionPos - 1;
				if v82.suggestionPos < 1 then
					v82.suggestionPos = v82.suggestionDisplayed;
				end;
			elseif p20 == Enum.KeyCode.Right then
				u1(v82);
			end;
			local v84 = v82.rframe["Label" .. v82.suggestionPos];
			if v84 ~= v83 then
				v83.BackgroundColor3 = v82.otherColor;
				v84.BackgroundColor3 = v82.highlightColor;
			end;
		end;
	end;
end;
return u4;
