--[[VARIABLE DEFINITION ANOMALY DETECTED, DECOMPILATION OUTPUT POTENTIALLY INCORRECT]]--
-- Decompiled with the Synapse X Luau decompiler.


local u1 = nil;
coroutine.wrap(function()
	u1 = require(game.ReplicatedStorage:WaitForChild("Resources"));
end)();
local v1 = {};
local l__InfoOverlay__2 = u1.Assets.UI:WaitForChild("InfoOverlay");
local u2 = nil;
local l__Blocks__3 = l__InfoOverlay__2:WaitForChild("Blocks");
local u4 = {};
local u5 = nil;
local u6 = u1.PlayerModule.Get("Mouse");
local u7 = game:GetService("GuiService"):GetGuiInset();
local u8 = {};
function v1.Add(p1, ...)
	if u2 then
		v1.Remove();
	end;
	local v3 = l__InfoOverlay__2:FindFirstChild("Base"):Clone();
	local v4 = 0;
	for v5, v6 in ipairs({ ... }) do
		local v8 = v6[1];
		local v9 = l__Blocks__3:FindFirstChild(v8):Clone();
		local l__settings__10 = v9:FindFirstChild("settings");
		if l__settings__10 and l__settings__10:FindFirstChild("code") then
			coroutine.wrap(function()
				(u4[v8] or require(l__settings__10:FindFirstChild("code")))(v9, unpack(v6));
			end)();
		end;
		v9.LayoutOrder = v5 * 100;
		if l__settings__10 then
			local v11 = l__settings__10:GetAttribute("boundsX");
			local l__Y__12 = v11.Y;
			local v13 = 0;
			local v14 = 0;
			local v15 = 0;
			for v16, v17 in ipairs(v9:GetChildren()) do
				if v17:IsA("GuiObject") and v17.Visible then
					if v17.ClassName == "TextLabel" or v17.ClassName == "TextButton" then
						if v17.Size.X.Scale ~= 0 then
							local v19 = u1.TextService:GetTextSize(string.gsub(v17.Text, "<.->", function()
								return "";
							end), v17.TextSize, v17.Font, (Vector2.new(l__Y__12 * v17.Size.X.Scale, 1000))) + Vector2.new(4, 1);
							v13 = math.max(v19.X, v13);
							v14 = v14 + math.max(v19.Y, v9.AbsoluteSize.Y);
							v17.Size = UDim2.new(0, v19.X, 0, v19.Y);
						end;
					elseif v17.Size.X.Scale ~= 0 then
						v15 = v15 + v17.AbsoluteSize.Y;
					end;
				end;			
			end;
			local v20 = v9:FindFirstChildOfClass("UIListLayout");
			if v20 and v20.FillDirection == Enum.FillDirection.Horizontal then
				v13 = math.max(v20.AbsoluteContentSize.X, v13);
			end;
			v9.Size = UDim2.new(1, 0, 0, v14 + v15);
			v4 = math.max(math.clamp(v13, v11.X, l__Y__12), v4);
		end;
		v9.Parent = v3.Frame.Blocks;	
	end;
	local v21 = v3.Frame.Blocks:FindFirstChildOfClass("UIPadding");
	local v22 = v3.Frame.Blocks:FindFirstChildOfClass("UIListLayout");
	v22:ApplyLayout();
	v3.Size = UDim2.new(0, v4 + v21.PaddingLeft.Offset + v21.PaddingRight.Offset, 0, v22.AbsoluteContentSize.Y + v21.PaddingTop.Offset + v21.PaddingBottom.Offset);
	v3.UIScale.Scale = 1 - (1 - math.min(u1.Functions.ResolutionScale(), 1)) / 1.5;
	if not u5 then
		u5 = Instance.new("ScreenGui");
		u5.DisplayOrder = 100;
		u5.ZIndexBehavior = Enum.ZIndexBehavior.Global;
		u5.ResetOnSpawn = false;
		u5.Name = "InfoOverlay";
		u5.Parent = u1.PlayerModule.Get("PlayerGui");
	end;
	v3.Parent = u5;
	u2 = v3;
	u1.GUI.ToggleCursor(false);
	local v23 = nil;
	for v24, v25 in ipairs({ ... }) do
		if v25[1] == "Rarity" and v25[2] then
			v23 = v25[2];
			break;
		end;	
	end;
	if v23 == "Mythical" or v23 == "Exclusive" then
		local v27 = v3.Frame:FindFirstChildOfClass("UIStroke");
		v27.Color = Color3.new(1, 1, 1);
		local v28 = u1.Assets.UI.Raritys:FindFirstChild(v23):Clone();
		v28.Parent = v27;
		if v23 == "Mythical" then
			v3.pointer.pointer.ImageColor3 = Color3.fromRGB(255, 85, 255);
		elseif v23 == "Exclusive" then
			v3.pointer.pointer.ImageColor3 = Color3.fromRGB(255, 170, 255);
		end;
		if v23 == "Mythical" then
			task.defer(function()
				local v29 = true;
				while v3 and v3.Parent do
					local v30 = v29 and Color3.fromRGB(255, 245, 230) or Color3.new(1, 1, 1);
					u1.Functions.Tween(v3.pointer, { 1.25, 1, 2 }, {
						ImageColor3 = v30
					});
					u1.Functions.Tween(v3.Frame, { 1.25, 1, 2 }, {
						BackgroundColor3 = v30
					}).Completed:Wait();
					v29 = not v29;				
				end;
			end);
		end;
		task.defer(function()
			while v3 and v3.Parent do
				v28.Rotation = os.clock() * 250;
				u1.RenderStepped();			
			end;
		end);
	end;
	local u9 = "Down";
	task.defer(function()
		while v3 and v3.Parent do
			local v31 = u6.X;
			local v32 = u6.Y;
			local l__X__33 = v3.AbsoluteSize.X;
			local l__Y__34 = v3.AbsoluteSize.Y;
			local v35 = game.Workspace.CurrentCamera.ViewportSize.Y - u7.Y;
			if u1.Variables.Console then
				v31 = p1.AbsolutePosition.X + p1.AbsoluteSize.X * 0.5;
				v32 = p1.AbsolutePosition.Y + p1.AbsoluteSize.Y * 0.5;
			end;
			if v32 + l__Y__34 + 30 < v35 then
				u9 = "Down";
			elseif v32 - l__Y__34 - 30 > 0 then
				u9 = "Up";
			end;
			local v36
			if u9 == "Down" then
				v36 = 30;
			else
				v36 = -30;
			end;
			local v37
			if u9 == "Down" then
				v37 = 0;
			else
				v37 = 1;
			end;
			v3.AnchorPoint = Vector2.new(0, v37);
			local v38
			v3.Position = UDim2.new(0, math.clamp(v31 + 30, 0, game.Workspace.CurrentCamera.ViewportSize.X - u7.X + (-l__X__33 and l__X__33)), 0, (math.clamp(v32 + v36, 0, v35 + (u9 == "Down" and -l__Y__34 or l__Y__34))));
			if u9 == "Down" then
				v38 = 1;
			else
				v38 = 0;
			end;
			v3.pointer.AnchorPoint = Vector2.new(1, v38);
			local v39
			if u9 == "Down" then
				v39 = 0;
			else
				v39 = 1;
			end;
			local v40
			if u9 == "Down" then
				v40 = 30;
			else
				v40 = -30;
			end;
			v3.pointer.Position = UDim2.new(0, 30, v39, v40);
			if u9 == "Down" then
				v3.pointer.Rotation = 0;
			elseif u9 == "Up" then
				v3.pointer.Rotation = -90;
			else
				v3.pointer.Rotation = -180;
			end;
			u1.RenderStepped();		
		end;
	end);
	task.defer(function()
		while v3 and v3.Parent do
			local l__X__41 = u6.X;
			local l__Y__42 = u6.Y;
			local l__X__43 = p1.AbsolutePosition.X;
			local l__Y__44 = p1.AbsolutePosition.Y;
			if not u1.Variables.Console then
				if l__X__43 + p1.AbsoluteSize.X < l__X__41 or l__X__41 < l__X__43 or l__Y__44 + p1.AbsoluteSize.Y < l__Y__42 or l__Y__42 < l__Y__44 then
					v1.Remove();
				end;
			elseif u1.GuiService.SelectedObject ~= p1 then
				v1.Remove();
			end;
			u1.RenderStepped();		
		end;
	end);
	if u1.Variables.Mobile then
		local u10 = nil;
		local u11 = tick();
		u10 = p1.MouseButton1Up:Connect(function()
			u10:Disconnect();
			if tick() - u11 < 0.5 then
				v1.Remove();
			end;
		end);
		u8[#u8 + 1] = u10;
	end;
end;
function v1.Remove()
	if u2 then
		for v45, v46 in ipairs(u8) do
			v46:Disconnect();		
		end;
		u8 = {};
		u2:Destroy();
		u1.GUI.ToggleCursor(true);
		u2 = nil;
	end;
end;
return v1;
