----------------------------------------------------------------
-----------------------SCROLLBAR STUFF--------------------------
----------------------------------------------------------------
----------------------------------------------------------------

local ScrollBarWidth = 16

local ScrollStyles = {
	Background = Color3.fromRGB(37, 37, 42),
	Border = Color3.fromRGB(20, 20, 25),
	Selected = Color3.fromRGB(5, 100, 140),
	BorderSelected = Color3.fromRGB(2, 130, 145),
	Text = Color3.fromRGB(245, 245, 250),
	TextDisabled = Color3.fromRGB(188, 188, 193),
	TextSelected = Color3.fromRGB(255, 255, 255),
	Button = Color3.fromRGB(31, 31, 36),
	ButtonBorder = Color3.fromRGB(133, 133, 138),
	ButtonSelected = Color3.fromRGB(0, 168, 155),
	Field = Color3.fromRGB(37, 37, 42),
	FieldBorder = Color3.fromRGB(50, 50, 55),
	TitleBackground = Color3.fromRGB(11, 11, 16)
}
do
	local ZIndexLock = {}
	function SetZIndex(object,z)
		if not ZIndexLock[object] then
			ZIndexLock[object] = true
			if object:IsA'GuiObject' then
				object.ZIndex = z
			end
			local children = object:GetChildren()
			for i = 1,#children do
				SetZIndex(children[i],z)
			end
			ZIndexLock[object] = nil
		end
	end
end
function SetZIndexOnChanged(object)
	return object.Changed:connect(function(p)
		if p == "ZIndex" then
			SetZIndex(object,object.ZIndex)
		end
	end)
end
