-- ALEX WAS HERE LOL


local v1 = require(game.ReplicatedStorage:WaitForChild("Framework"):WaitForChild("Library"));
while not v1.Loaded do
	game:GetService("RunService").Heartbeat:Wait();
end;
return function(p1, p2, ...)
	local v2, v3 = ...;
	local v4 = v3 or Color3.fromRGB(111, 111, 111);
	p1.title.Text = v2;
	
	if v4 == "Dark Matter" then
		coroutine.wrap(function()
			while not p1.Parent do
				v1.RenderStepped();			
			end;
			local v5 = os.clock();
			while p1 and p1.Parent do
				p1.title.back.BackgroundColor3 = Color3.fromRGB(57, 8, 70):Lerp(Color3.fromRGB(0, 0, 0), math.sin((os.clock() - v5) * 50) / 2 + 0.5);
				v1.RenderStepped();			
			end;
		end)();
		return;
	end;
	
	if v4 == "Ghost" then
		coroutine.wrap(function()
			while not p1.Parent do
				v1.RenderStepped();			
			end;
			local v5 = os.clock();
			while p1 and p1.Parent do
				p1.title.back.BackgroundColor3 = Color3.fromRGB(177, 177, 177):Lerp(Color3.fromRGB(206, 206, 206), math.sin((os.clock() - v5) * 50) / 2 + 0.5);
				v1.RenderStepped();			
			end;
		end)();
		return;
	end;
	if v4 == "Rainbow" then
		coroutine.wrap(function()
			while not p1.Parent do
				v1.RenderStepped();			
			end;
			v1.GUIFX.Rainbow(p1.title.back, "BackgroundColor3", 3);
		end)();
		return;
	end;
	if v4 == "Golden" then
		coroutine.wrap(function()
			while not p1.Parent do
				v1.RenderStepped();			
			end;
			local v6 = os.clock();
			while p1 and p1.Parent do
				p1.title.back.BackgroundColor3 = Color3.fromRGB(255, 253, 184):Lerp(Color3.fromRGB(255, 213, 61), math.sin((os.clock() - v6) * 4) / 2 + 0.5);
				v1.RenderStepped();			
			end;
		end)();
		return;
	end;
	
	if v4 == "Hardcore" then
		coroutine.wrap(function()
			while not p1.Parent do
				v1.RenderStepped();			
			end;
			local v6 = os.clock();
			while p1 and p1.Parent do
				p1.title.back.BackgroundColor3 = Color3.fromRGB(97, 121, 255):Lerp(Color3.fromRGB(73, 89, 244), math.sin((os.clock() - v6) * 4) / 2 + 0.5);
				v1.RenderStepped();			
			end;
		end)();
		return;
	end;
	if v4 == "Shiny" then
		p1.title.back.BackgroundColor3 = Color3.fromRGB(255, 255, 255);
		v1.Assets.UI.Inventory.ShinyGradient:Clone().Parent = p1.title.back;
		return;
	end;
	--p1.title.back.BackgroundColor3 = v4;
	--[[if v4 ~= "Hardcore" then
		p1.title.back.BackgroundColor3 = v4;
		return;
	end;]]--

	p1.title.back.BackgroundColor3 = v4;
	v1.Assets.UI.Inventory.Hardcore:Clone().Parent = p1.title.back;
end;
