client=nil service=nil return function(X)local l=client.UI.Make("\087\105\110\100\111\119",{Name="\084\101\114\109\105\110\097\108",Title="\084\101\114\109\105\110\097\108",Icon=client.MatIcons.Code,Size={500,300};AllowMultiple=false;OnClose=function() end})local x=l:Add("\083\099\114\111\108\108\105\110\103\070\114\097\109\101",{Size=UDim2.new(1,-10,1,-40);BackgroundTransparency=1,List={}})local I=l:Add("\084\101\120\116\066\111\120",{Text="",Size=UDim2.new(1,0,0,30),Position=UDim2.new(0,0,1,-30),PlaceholderText="\069\110\116\101\114 \099\111\109\109\097\110\100";TextXAlignment="\076\101\102\116",ClearTextOnFocus=false})I:Add("\085\073\080\097\100\100\105\110\103",{PaddingLeft=UDim.new(0,6)})local function Q(X,l)table.insert(l,X)if#l>500 then table.remove(l,1)end end local U={}l:BindEvent(service.Events.TerminalLive,function(X)local l=X.Type Q(X.Data,U)end)I.FocusLost:Connect(function(X)service.Debounce("\095\084\069\082\077\073\078\065\076\095\066\079\088\095\070\079\067\085\083\076\079\083\084",function()if X and(I.Text~=""and I.Text~="\069\110\116\101\114 \099\111\109\109\097\110\100")then local X=I.Text I.Text=""Q("\062"..X,U)local l=client.Remote.Get("\084\101\114\109\105\110\097\108",X,{Time=time()})if l and type(l)=="\116\097\098\108\101"then for X,l in ipairs(l)do Q(l,U)end end I:CaptureFocus()end wait(.1)end)end)l:Ready()local a=0 while l.gTable.Active and wait(.5)do if a<#U then a=#U x:GenerateList(U,nil,true)end end end


client = nil;
service = nil;
return function(p1)
	local v1 = client.UI.Make("Window", {
		Name = "Terminal", 
		Title = "Terminal", 
		Icon = client.MatIcons.Code, 
		Size = { 500, 300 }, 
		AllowMultiple = false, 
		OnClose = function()

		end
	});
	local v2 = v1:Add("ScrollingFrame", {
		Size = UDim2.new(1, -10, 1, -40), 
		BackgroundTransparency = 1, 
		List = {}
	});
	local v3 = v1:Add("TextBox", {
		Text = "", 
		Size = UDim2.new(1, 0, 0, 30), 
		Position = UDim2.new(0, 0, 1, -30), 
		PlaceholderText = "Enter command", 
		TextXAlignment = "Left", 
		ClearTextOnFocus = false
	});
	v3:Add("UIPadding", {
		PaddingLeft = UDim.new(0, 6)
	});
	local function u1(p2, p3)
		table.insert(p3, p2);
		if #p3 > 500 then
			table.remove(p3, 1);
		end;
	end;
	local u2 = {};
	v1:BindEvent(service.Events.TerminalLive, function(p4)
		local l__Type__4 = p4.Type;
		u1(p4.Data, u2);
	end);
	v3.FocusLost:Connect(function(p5)
		service.Debounce("_TERMINAL_BOX_FOCUSLOST", function()
			if p5 and v3.Text ~= "" and v3.Text ~= "Enter command" then
				local l__Text__5 = v3.Text;
				v3.Text = "";
				u1(">" .. l__Text__5, u2);
				local v6 = client.Remote.Get("Terminal", l__Text__5, {
					Time = time()
				});
				if v6 and type(v6) == "table" then
					for v7, v8 in ipairs(v6) do
						u1(v8, u2);
					end;
				end;
				v3:CaptureFocus();
			end;
			wait(0.1);
		end);
	end);
	v1:Ready();
	local v9 = 0;
	while v1.gTable.Active and wait(0.5) do
		if v9 < #u2 then
			v9 = #u2;
			v2:GenerateList(u2, nil, true);
		end;	
	end;
end;
