function AttributeValue.__index(f,p)if p=="\086\097\108\117\101"then local p=f._object:GetAttribute(rawget(f,"\095\097\116\116\114\105\098\117\116\101\078\097\109\101"))local s=rawget(f,"\095\100\101\102\097\117\108\116\086\097\108\117\101")if p==nil then return s else return p end elseif p=="\067\104\097\110\103\101\100"then return f._object:GetAttributeChangedSignal(f._attributeName)elseif AttributeValue[p]then return AttributeValue[p]else error(("\037\113 \105\115 \110\111\116 \097 \109\101\109\098\101\114 \111\102 \065\116\116\114\105\098\117\116\101\086\097\108\117\101"):format(tostring(p)))end end function AttributeValue.__newindex(s,p,f)if p=="\086\097\108\117\101"then s._object:SetAttribute(rawget(s,"\095\097\116\116\114\105\098\117\116\101\078\097\109\101"),f)else error(("\037\113 \105\115 \110\111\116 \097 \109\101\109\098\101\114 \111\102 \065\116\116\114\105\098\117\116\101\086\097\108\117\101"):format(tostring(p)))end end return AttributeValue

function AttributeValue:__index(index)
	if index == "Value" then
		local result = self._object:GetAttribute(rawget(self, "_attributeName"))
		local default = rawget(self, "_defaultValue")
		if result == nil then
			return default
		else
			return result
		end
	elseif index == "Changed" then
		return self._object:GetAttributeChangedSignal(self._attributeName)
	elseif AttributeValue[index] then
		return AttributeValue[index]
	else
		error(("%q is not a member of AttributeValue"):format(tostring(index)))
	end
end

function AttributeValue:__newindex(index, value)
	if index == "Value" then
		self._object:SetAttribute(rawget(self, "_attributeName"), value)
	else
		error(("%q is not a member of AttributeValue"):format(tostring(index)))
	end
end

return AttributeValue
