local function o(o,Z)local h if type(o)=="\115\116\114\105\110\103"then h=Instance_new(o)else h=o end for o,Z in pairs(Z)do if type(o)=="\110\117\109\098\101\114"then Z.Parent=h else h[o]=Z end end return h end local Z=false local h={}function createDDown(o,K,...)if Z then for o,Z in pairs(h)do Z:Destroy()end h={}Z=false return else Z=true end local H=table.pack(...)local V=o for e,I in ipairs(H)do local c=V:Clone()c.ZIndex=5 c.Name="\079\112\116\105\111\110 "..tostring(e)c.Parent=V.Parent.Parent.Parent c.BackgroundTransparency=0 c.BackgroundColor3=Color3.fromRGB(24,24,29)c.BorderSizePixel=0 c.ZIndex=2 table.insert(h,c)c.Position=UDim2_new(-0.4,o.Position.X.Offset,o.Position.Y.Scale,o.Position.Y.Offset+#h*o.Size.Y.Offset)c.Text=H[e]c.MouseButton1Down:connect(function()o.Text=H[e]K(H[e])for o,Z in pairs(h)do Z:Destroy()end h={}Z=false end)end end


local function Create(ty,data)
	local obj
	if type(ty) == 'string' then
		obj = Instance_new(ty)
	else
		obj = ty
	end
	for k, v in pairs(data) do
		if type(k) == 'number' then
			v.Parent = obj
		else
			obj[k] = v
		end
	end
	return obj
end

local barActive = false
local activeOptions = {}

function createDDown(dBut, callback,...)
	if barActive then
		for i,v in pairs(activeOptions) do
			v:Destroy()
		end
		activeOptions = {}
		barActive = false
		return
	else
		barActive = true
	end
	local slots = table.pack(...)
	local base = dBut
	for i,v in ipairs(slots) do
		local newOption = base:Clone()
		newOption.ZIndex = 5
		newOption.Name = "Option "..tostring(i)
		newOption.Parent = base.Parent.Parent.Parent
		newOption.BackgroundTransparency = 0
		newOption.BackgroundColor3 = Color3.fromRGB(24, 24, 29)
		newOption.BorderSizePixel = 0
		newOption.ZIndex = 2
		table.insert(activeOptions,newOption)
		newOption.Position = UDim2_new(-0.4, dBut.Position.X.Offset, dBut.Position.Y.Scale, dBut.Position.Y.Offset + (#activeOptions * dBut.Size.Y.Offset))
		newOption.Text = slots[i]
		newOption.MouseButton1Down:connect(function()
			dBut.Text = slots[i]
			callback(slots[i])
			for i,v in pairs(activeOptions) do
				v:Destroy()
			end
			activeOptions = {}
			barActive = false
		end)
	end
end
