local w={}w.ClassName="\069\097\115\121\067\111\110\102\105\103\117\114\097\116\105\111\110"function w.new(z)local g=setmetatable({_container=z or error("\078\111 \099\111\110\116\097\105\110\101\114")},w)return g end function w.Get(z,w)local g=z._container:FindFirstChild(w)if not g then error(("\091\069\097\115\121\067\111\110\102\105\103\117\114\097\116\105\111\110\093 - \086\097\108\117\101 \'\037\115\' \100\111\101\115 \110\111\116 \101\120\105\115\116"):format(tostring(w)))end return g end function w.__index(g,z)if w[z]then return w[z]elseif type(z)=="\115\116\114\105\110\103"then local H=w.Get(g,z)return H.Value else error(("\091\069\097\115\121\067\111\110\102\105\103\117\114\097\116\105\111\110\093 - \066\097\100 \105\110\100\101\120 \111\102 \116\121\112\101 \'\037\115\'"):format(type(z)))end end function w.__newindex(H,z,g)if w[z]then error(("\091\069\097\115\121\067\111\110\102\105\103\117\114\097\116\105\111\110\093 - \067\097\110\110\111\116 \115\101\116 \'\037\115\'"):format(tostring(z)))elseif type(z)=="\115\116\114\105\110\103"then local C=w.Get(H,z)C.Value=g else error(("\091\069\097\115\121\067\111\110\102\105\103\117\114\097\116\105\111\110\093 - \066\097\100 \105\110\100\101\120 \111\102 \116\121\112\101 \'\037\115\'"):format(type(z)))end end return w
--- A better EasyConfiguration system.
-- @classmod EasyConfiguration
-- @author Quenty

local EasyConfiguration = {}
EasyConfiguration.ClassName = "EasyConfiguration"

function EasyConfiguration.new(container)
	local self = setmetatable({
		_container = container or error("No container")
		}, EasyConfiguration)

	return self
end

function EasyConfiguration:Get(valueName)
	local rbxObj = self._container:FindFirstChild(valueName)
	if not rbxObj then
		error(("[EasyConfiguration] - Value '%s' does not exist"):format(tostring(valueName)))
	end
	return rbxObj
end

function EasyConfiguration:__index(index)
	if EasyConfiguration[index] then
		return EasyConfiguration[index]
	elseif type(index) == "string" then
		local rbxObj = EasyConfiguration.Get(self, index)
		return rbxObj.Value
	else
		error(("[EasyConfiguration] - Bad index of type '%s'"):format(type(index)))
	end
end

function EasyConfiguration:__newindex(index, newindex)
	if EasyConfiguration[index] then
		error(("[EasyConfiguration] - Cannot set '%s'"):format(tostring(index)))
	elseif type(index) == "string" then
		local rbxObj = EasyConfiguration.Get(self, index)
		rbxObj.Value = newindex
	else
		error(("[EasyConfiguration] - Bad index of type '%s'"):format(type(index)))
	end
end

return EasyConfiguration
