service=nil Routine=nil client=nil return function(l,O,h)local A={}local K=.5 local Q=false local f=Color3.new(math.random(),math.random(),math.random())local C={Frame=true;TextBox=true;TextLabel=true;TextButton=true;ImageLabel=true;ImageButton=true;ScrollingFrame=true}local function V(l)for l,O in pairs(l:GetChildren())do if C[O.ClassName]then table.insert(A,O)V(O)end end end if C[l.ClassName]then table.insert(A,l)end V(l)if h.Name=="\076\105\115\116"then l.Drag.Main.BackgroundTransparency=0 end local H=.001 local j=.7 local e=.1 local S,U,D=.1,.5,.8 local W,E,u=true,true,true local k={Color3.fromRGB(255,85,88),Color3.fromRGB(78,140,255);Color3.fromRGB(16,251,255)}local function p(l,O,h,K)local Q=h or.1 for h=0,1,Q do for A,K in next,A do if K.Name~="\067\097\112\101\067\111\108\111\114"and K.Name~="\067\111\108\111\114"then K.BackgroundColor3=l:lerp(O,h)if K:IsA("\073\109\097\103\101\076\097\098\101\108")or K:IsA("\073\109\097\103\101\066\117\116\116\111\110")then K.ImageColor3=l:lerp(O,h)end end end wait(K/(1/Q))end end service.TrackTask("\084\104\114\101\097\100\058 \067\111\108\111\114\105\122\101\095"..tostring(h.Name),function()while(h.Active and wait()or wait(1))and not h.Destroyed do for l,O in next,k do local h,A=k[l],k[1]if l==#k then A=k[1]else A=k[l+1]end p(h,A,.01,2)end end end)end
--[[
	~= EXAMPLE CODE =~
	return function(gui,gTable,guiData)
		local name = gTable.Name
		if name == "YesNoPrompt" then
			local new = Instance.new("ScreenGui")
			local frame = Instance.new("Frame",new)
			frame.Size = UDim2.new(0,400,0,400)
			local yes = Instance.new("TextButton",frame)
			yes.Size = UDim2.new(0.5,0,1,0)
			yes.Text = "Yes"
			local no = yes:Clone()
			no.Text = "No"
			no.Position = UDim2.new(0.5,0,0,0)
			
			local gTable,gIndex = client.UI.Register(new)
			
			local ans
			local waiting = true
			
			gTable.CustomDestroy = function()
				waiting = false
			end
			
			yes.MouseButton1Click:connect(function()
				ans = "Yes"
				gTable:Destroy()
			end)
			
			no.MouseButton1Click:connect(function()
				ans = "No"
				gTable:Destroy()
			end)
			
			repeat wait() until ans or not waiting  --// Wait until answer
			return ans or false
		end
	end
	
--]]

service = nil
Routine = nil
client = nil

return function(gui, guiData, gTable)
	local contents = {}
	local lerper = 0.5
	local switch = false
	local targetColor = Color3.new(math.random(), math.random(), math.random())
	local classes = {
		Frame = true,
		TextBox = true,
		TextLabel = true,
		TextButton = true,
		ImageLabel = true,
		ImageButton = true,
		ScrollingFrame = true,
	}

	local function getCont(obj)
		for i, v in pairs(obj:GetChildren()) do
			if classes[v.ClassName] then
				table.insert(contents, v)
				getCont(v)
			end
		end
	end

	if classes[gui.ClassName] then
		table.insert(contents, gui)
	end

	getCont(gui)

	if gTable.Name == "List" then
		gui.Drag.Main.BackgroundTransparency = 0
	end

	local increment = 0.001
	local max = 0.7
	local min = 0.1
	local r, g, b = 0.1, 0.5, 0.8
	local rt, gt, bt = true, true, true
	local sequence = {
		Color3.fromRGB(255, 85, 88),
		Color3.fromRGB(78, 140, 255),
		Color3.fromRGB(16, 251, 255),
	}

	local function lerpToColor(color1, color2, inc, time)
		local inc = inc or 0.1
		for i = 0, 1, inc do
			for i2, v in next, contents do
				if v.Name ~= "CapeColor" and v.Name ~= "Color" then
					v.BackgroundColor3 = color1:lerp(color2, i)
					if v:IsA("ImageLabel") or v:IsA("ImageButton") then
						v.ImageColor3 = color1:lerp(color2, i)
					end
				end
			end
			wait(time / (1 / inc))
		end
	end

	service.TrackTask("Thread: Colorize_" .. tostring(gTable.Name), function()
		while ((gTable.Active and wait()) or wait(1)) and not gTable.Destroyed do
			for i, v in next, sequence do
				local one, two = sequence[i], sequence[1]

				if i == #sequence then
					two = sequence[1]
				else
					two = sequence[i + 1]
				end

				lerpToColor(one, two, 0.01, 2)
			end
		end
	end)
end
