local t=_G.HDAdminMain local e={custom=t.gui.MainFrame.Pages.Settings.Custom}local o=t.settings.ThemeColors or{{"\082\101\100",Color3.fromRGB(150,0,0)};{"\079\114\097\110\103\101",Color3.fromRGB(150,75,0)};{"\066\114\111\119\110",Color3.fromRGB(120,80,30)},{"\089\101\108\108\111\119";Color3.fromRGB(130,120,0)},{"\071\114\101\101\110";Color3.fromRGB(0,120,0)},{"\066\108\117\101";Color3.fromRGB(0,100,150)};{"\080\117\114\112\108\101";Color3.fromRGB(100,0,150)};{"\080\105\110\107",Color3.fromRGB(150,0,100)};{"\066\108\097\099\107";Color3.fromRGB(60,60,60)}}local R=6.1/#o local s=true local q=e.custom["\065\066 \084\104\101\109\101\083\101\108\101\099\116\105\111\110"]local function J(e,R)if e==nil then for o,s in pairs(o)do if s[1]==t.pdata.Theme then e=s[1]R=s[2]break end end end if e then local o={}for t,e in pairs(t.gui:GetDescendants())do if e:IsA("\066\111\111\108\086\097\108\117\101")and e.Name=="\084\104\101\109\101"then table.insert(o,e.Parent)end end local s,J,U=pairs(o)while true do local t,e=s(J,U)if not t then break end local o=R if e.Theme.Value then local t,e,s=Color3.toHSV(R)o=Color3.fromHSV(t,e,s*1.35)end if e:IsA("\084\101\120\116\076\097\098\101\108")then local t,o,s=Color3.toHSV(R)e.TextColor3=Color3.fromHSV(t,o,s*2)else e.BackgroundColor3=o end end for t,o in pairs(q:GetChildren())do if o:IsA("\084\101\120\116\066\117\116\116\111\110")then if o.Name==e then o.BorderSizePixel=1 else o.BorderSizePixel=0 end end end end end for e,o in pairs(o)do local U=o[1]local S=o[2]local y=q.ThemeTemplate:Clone()y.Name=U y.UIAspectRatioConstraint.AspectRatio=R y.BackgroundColor3=S local H=s y.MouseButton1Down:Connect(function()if H then H=false t.signals.ChangeSetting:InvokeServer({"\084\104\101\109\101";U})J(U,S)H=true end end)y.Visible=true y.Parent=q end local function U()for e,o in pairs(e.custom:GetChildren())do local R=string.sub(o.Name,5)if o:FindFirstChild("\083\101\116\116\105\110\103\086\097\108\117\101")then o.SettingName.TextLabel.Text=R.."\058"local e=t.pdata[R]o.SettingValue.TextBox.Text=tostring(e)local s=nil local q=nil if string.sub(R,1,5)=="\069\114\114\111\114"then s="\069\114\114\111\114"q=6 elseif string.sub(R,1,6)=="\078\111\116\105\099\101"then s="\078\111\116\105\099\101"q=7 end if s then local o=string.sub(R,q)if o=="\083\111\117\110\100\073\100"then e="\114\098\120\097\115\115\101\116\105\100\058\047\047"..e end t.audio[s][o]=e end end end J()end for e,o in pairs(e.custom:GetChildren())do local R=string.sub(o.Name,5)if o:FindFirstChild("\083\101\116\116\105\110\103\086\097\108\117\101")then local e=true local s=o.SettingValue.TextBox local q=o.SettingValue.TextLabel o.SettingValue.TextBox.FocusLost:connect(function(J)if e then local J=o.SettingValue.TextBox.Text e=false s.Visible=false q.Visible=true q.Text="\076\111\097\100\105\110\103\046\046\046"local S=t.signals.ChangeSetting:InvokeServer({R;J})if S=="\083\117\099\099\101\115\115"then local e=nil U()local o="\078\111\116\105\099\101"local s=string.sub(R,1,5)if s=="\069\114\114\111\114"or s=="\065\108\101\114\116"then o=s end if R=="\080\114\101\102\105\120"then(t:GetModule("\080\097\103\101\067\111\109\109\097\110\100\115")):CreateCommands()end e="\083\117\099\099\101\115\115\102\117\108\108\121 \099\104\097\110\103\101\100 \'"..(R..("\' \116\111 \'"..(J.."\'")))if o=="\065\108\101\114\116"then(t:GetModule("\099\102")):CreateNewCommandMenu("\115\101\116\116\105\110\103\115",{"\083\101\116\116\105\110\103\115 \065\108\101\114\116";e},8,true)else(t:GetModule("\078\111\116\105\099\101\115")):Notice(o,"\083\101\116\116\105\110\103\115",e)end else q.Text=S wait(1)end s.Visible=true q.Visible=false o.SettingValue.TextBox.Text=tostring(t.pdata[R])e=true end end)end end U()local S=e.custom["\065\088 \082\101\115\116\111\114\101"]local y=0 local H=S.Loading S.MouseButton1Down:Connect(function()if y<2 then local e,o,R=Color3.toHSV(S.BackgroundColor3)H.BackgroundColor3=Color3.fromHSV(e,o,R*.5)H.Visible=true if y==0 then y=1 H.Blocker.Visible=false H.TextLabel.Text="\067\111\110\102\105\114\109\063"wait(1)elseif y==1 then y=2 H.Blocker.Visible=true H.TextLabel.Text="\076\111\097\100\105\110\103\046\046\046"local e=t.signals.RestoreDefaultSettings:InvokeServer()if e=="\083\117\099\099\101\115\115"then U();(t:GetModule("\080\097\103\101\067\111\109\109\097\110\100\115")):CreateCommands()local e=(t:GetModule("\099\102")):FormatNotice("\082\101\115\116\111\114\101\068\101\102\097\117\108\116\083\101\116\116\105\110\103\115");(t:GetModule("\078\111\116\105\099\101\115")):Notice("\078\111\116\105\099\101",e[1],e[2])else S.TextLabel.Text=e end wait(1)end y=0 H.Visible=false H.Blocker.Visible=false end end)local r=e.custom["\065\090 \083\112\097\099\101"]e.custom.CanvasSize=UDim2.new(0,0,0,(r.AbsolutePosition.Y-e.custom["\065\065 \083\112\097\099\101"].AbsolutePosition.Y)+r.AbsoluteSize.Y*1)return{}
-- Decompiled with the Synapse X Luau decompiler.

local l__HDAdminMain__1 = _G.HDAdminMain
local v2 = {
	custom = l__HDAdminMain__1.gui.MainFrame.Pages.Settings.Custom,
}
local v3 = l__HDAdminMain__1.settings.ThemeColors
	or {
		{ "Red", Color3.fromRGB(150, 0, 0) },
		{ "Orange", Color3.fromRGB(150, 75, 0) },
		{ "Brown", Color3.fromRGB(120, 80, 30) },
		{ "Yellow", Color3.fromRGB(130, 120, 0) },
		{ "Green", Color3.fromRGB(0, 120, 0) },
		{ "Blue", Color3.fromRGB(0, 100, 150) },
		{ "Purple", Color3.fromRGB(100, 0, 150) },
		{ "Pink", Color3.fromRGB(150, 0, 100) },
		{ "Black", Color3.fromRGB(60, 60, 60) },
	}
local v4 = 6.1 / #v3
local v5 = true
local u1 = v2.custom["AB ThemeSelection"]
local function v6(p1, p2)
	if p1 == nil then
		for v7, v8 in pairs(v3) do
			if v8[1] == l__HDAdminMain__1.pdata.Theme then
				p1 = v8[1]
				p2 = v8[2]
				break
			end
		end
	end
	if p1 then
		local v9 = {}
		for v10, v11 in pairs(l__HDAdminMain__1.gui:GetDescendants()) do
			if v11:IsA("BoolValue") and v11.Name == "Theme" then
				table.insert(v9, v11.Parent)
			end
		end
		local v12, v13, v14 = pairs(v9)
		while true do
			local v15, v16 = v12(v13, v14)
			if not v15 then
				break
			end
			local v17 = p2
			if v16.Theme.Value then
				local v18, v19, v20 = Color3.toHSV(p2)
				v17 = Color3.fromHSV(v18, v19, v20 * 1.35)
			end
			if v16:IsA("TextLabel") then
				local v21, v22, v23 = Color3.toHSV(p2)
				v16.TextColor3 = Color3.fromHSV(v21, v22, v23 * 2)
			else
				v16.BackgroundColor3 = v17
			end
		end
		for v24, v25 in pairs(u1:GetChildren()) do
			if v25:IsA("TextButton") then
				if v25.Name == p1 then
					v25.BorderSizePixel = 1
				else
					v25.BorderSizePixel = 0
				end
			end
		end
	end
end
for v26, v27 in pairs(v3) do
	local v28 = v27[1]
	local v29 = v27[2]
	local v30 = u1.ThemeTemplate:Clone()
	v30.Name = v28
	v30.UIAspectRatioConstraint.AspectRatio = v4
	v30.BackgroundColor3 = v29
	local u2 = v5
	v30.MouseButton1Down:Connect(function()
		if u2 then
			u2 = false
			l__HDAdminMain__1.signals.ChangeSetting:InvokeServer({ "Theme", v28 })
			v6(v28, v29)
			u2 = true
		end
	end)
	v30.Visible = true
	v30.Parent = u1
end
local function v31()
	for v32, v33 in pairs(v2.custom:GetChildren()) do
		local v34 = string.sub(v33.Name, 5)
		if v33:FindFirstChild("SettingValue") then
			v33.SettingName.TextLabel.Text = v34 .. ":"
			local v35 = l__HDAdminMain__1.pdata[v34]
			v33.SettingValue.TextBox.Text = tostring(v35)
			local v36 = nil
			local v37 = nil
			if string.sub(v34, 1, 5) == "Error" then
				v36 = "Error"
				v37 = 6
			elseif string.sub(v34, 1, 6) == "Notice" then
				v36 = "Notice"
				v37 = 7
			end
			if v36 then
				local v38 = string.sub(v34, v37)
				if v38 == "SoundId" then
					v35 = "rbxassetid://" .. v35
				end
				l__HDAdminMain__1.audio[v36][v38] = v35
			end
		end
	end
	v6()
end
for v39, v40 in pairs(v2.custom:GetChildren()) do
	local v41 = string.sub(v40.Name, 5)
	if v40:FindFirstChild("SettingValue") then
		local u3 = true
		local l__TextBox__4 = v40.SettingValue.TextBox
		local l__TextLabel__5 = v40.SettingValue.TextLabel
		v40.SettingValue.TextBox.FocusLost:connect(function(p3)
			if u3 then
				local l__Text__42 = v40.SettingValue.TextBox.Text
				u3 = false
				l__TextBox__4.Visible = false
				l__TextLabel__5.Visible = true
				l__TextLabel__5.Text = "Loading..."
				local v43 = l__HDAdminMain__1.signals.ChangeSetting:InvokeServer({ v41, l__Text__42 })
				if v43 == "Success" then
					local v44 = nil
					v31()
					local v45 = "Notice"
					local v46 = string.sub(v41, 1, 5)
					if v46 == "Error" or v46 == "Alert" then
						v45 = v46
					end
					if v41 == "Prefix" then
						l__HDAdminMain__1:GetModule("PageCommands"):CreateCommands()
					end
					v44 = "Successfully changed '" .. v41 .. "' to '" .. l__Text__42 .. "'"
					if v45 == "Alert" then
						l__HDAdminMain__1
							:GetModule("cf")
							:CreateNewCommandMenu("settings", { "Settings Alert", v44 }, 8, true)
					else
						l__HDAdminMain__1:GetModule("Notices"):Notice(v45, "Settings", v44)
					end
				else
					l__TextLabel__5.Text = v43
					wait(1)
				end
				l__TextBox__4.Visible = true
				l__TextLabel__5.Visible = false
				v40.SettingValue.TextBox.Text = tostring(l__HDAdminMain__1.pdata[v41])
				u3 = true
			end
		end)
	end
end
v31()
local v47 = v2.custom["AX Restore"]
local u6 = 0
local l__Loading__7 = v47.Loading
v47.MouseButton1Down:Connect(function()
	if u6 < 2 then
		local v48, v49, v50 = Color3.toHSV(v47.BackgroundColor3)
		l__Loading__7.BackgroundColor3 = Color3.fromHSV(v48, v49, v50 * 0.5)
		l__Loading__7.Visible = true
		if u6 == 0 then
			u6 = 1
			l__Loading__7.Blocker.Visible = false
			l__Loading__7.TextLabel.Text = "Confirm?"
			wait(1)
		elseif u6 == 1 then
			u6 = 2
			l__Loading__7.Blocker.Visible = true
			l__Loading__7.TextLabel.Text = "Loading..."
			local v51 = l__HDAdminMain__1.signals.RestoreDefaultSettings:InvokeServer()
			if v51 == "Success" then
				v31()
				l__HDAdminMain__1:GetModule("PageCommands"):CreateCommands()
				local v52 = l__HDAdminMain__1:GetModule("cf"):FormatNotice("RestoreDefaultSettings")
				l__HDAdminMain__1:GetModule("Notices"):Notice("Notice", v52[1], v52[2])
			else
				v47.TextLabel.Text = v51
			end
			wait(1)
		end
		u6 = 0
		l__Loading__7.Visible = false
		l__Loading__7.Blocker.Visible = false
	end
end)
local v53 = v2.custom["AZ Space"]
v2.custom.CanvasSize =
	UDim2.new(0, 0, 0, v53.AbsolutePosition.Y - v2.custom["AA Space"].AbsolutePosition.Y + v53.AbsoluteSize.Y * 1)
return {}
