local function R(R,k)if k=="\102\108\111\097\116"then return tostring(Round(R,2))elseif k=="\067\111\110\116\101\110\116"then if string.find(R,"\047\097\115\115\101\116")then local k=string.find(R,"\061")+1 local t=string.sub(R,k)return t else return tostring(R)end elseif k=="\086\101\099\116\111\114\050"then local k=R.x local t=R.y return string.format("\037\103\044 \037\103",k,t)elseif k=="\086\101\099\116\111\114\051"then local k=R.x local t=R.y local u=R.z return string.format("\037\103\044 \037\103\044 \037\103",k,t,u)elseif k=="\067\111\108\111\114\051"then local k=R.r local t=R.g local u=R.b return string.format("\037\100\044 \037\100\044 \037\100",k*255,t*255,u*255)elseif k=="\085\068\105\109\050"then local k=R.X.Scale local t=R.X.Offset local u=R.Y.Scale local n=R.Y.Offset return string.format("\123\037\100\044 \037\100\125\044 \123\037\100\044 \037\100\125",k,t,u,n)else return tostring(R)end end local function k(R,k)if k=="\086\101\099\116\111\114\050"then local k=Split(R,"\044")if#k<2 then return nil end local t=tonumber(k[1])or 0 local u=tonumber(k[2])or 0 return Vector2.new(t,u)elseif k=="\086\101\099\116\111\114\051"then local k=Split(R,"\044")if#k<3 then return nil end local t=tonumber(k[1])or 0 local u=tonumber(k[2])or 0 local n=tonumber(k[3])or 0 return Vector3.new(t,u,n)elseif k=="\067\111\108\111\114\051"then local k=Split(R,"\044")if#k<3 then return nil end local t=tonumber(k[1])or 0 local u=tonumber(k[2])or 0 local n=tonumber(k[3])or 0 return Color3.new(t/255,u/255,n/255)elseif k=="\085\068\105\109\050"then local k=Split(string.gsub(string.gsub(R,"\123",""),"\125",""),"\044")if#k<4 then return nil end local t=tonumber(k[1])or 0 local u=tonumber(k[2])or 0 local n=tonumber(k[3])or 0 local L=tonumber(k[4])or 0 return UDim2.new(t,u,n,L)elseif k=="\067\111\110\116\101\110\116"then if tonumber(R)~=nil then R=ContentUrl..R end return R elseif k=="\102\108\111\097\116"or k=="\105\110\116"or k=="\100\111\117\098\108\101"then return tonumber(R)elseif k=="\115\116\114\105\110\103"then return R elseif k=="\078\117\109\098\101\114\082\097\110\103\101"then local k=Split(R,"\044")if#k==1 then if tonumber(k[1])==nil then return nil end local R=tonumber(k[1])or 0 return NumberRange.new(R)end if#k<2 then return nil end local t=tonumber(k[1])or 0 local u=tonumber(k[2])or 0 return NumberRange.new(t,u)else return nil end end


local function ToString(value, type)
	if type == "float" then
		return tostring(Round(value,2))
	elseif type == "Content" then
		if string.find(value,"/asset") then
			local match = string.find(value, "=") + 1
			local id = string.sub(value, match)
			return id
		else
			return tostring(value)
		end
	elseif type == "Vector2" then
		local x = value.x
		local y = value.y
		return string.format("%g, %g", x,y)
	elseif type == "Vector3" then
		local x = value.x
		local y = value.y
		local z = value.z
		return string.format("%g, %g, %g", x,y,z)
	elseif type == "Color3" then
		local r = value.r
		local g = value.g
		local b = value.b
		return string.format("%d, %d, %d", r*255,g*255,b*255)
	elseif type == "UDim2" then
		local xScale = value.X.Scale
		local xOffset = value.X.Offset
		local yScale = value.Y.Scale
		local yOffset = value.Y.Offset
		return string.format("{%d, %d}, {%d, %d}", xScale, xOffset, yScale, yOffset)
	else
		return tostring(value)
	end
end

local function ToValue(value,type)
	if type == "Vector2" then
		local list = Split(value,",")
		if #list < 2 then return nil end
		local x = tonumber(list[1]) or 0
		local y = tonumber(list[2]) or 0
		return Vector2.new(x,y)
	elseif type == "Vector3" then
		local list = Split(value,",")
		if #list < 3 then return nil end
		local x = tonumber(list[1]) or 0
		local y = tonumber(list[2]) or 0
		local z = tonumber(list[3]) or 0
		return Vector3.new(x,y,z)
	elseif type == "Color3" then
		local list = Split(value,",")
		if #list < 3 then return nil end
		local r = tonumber(list[1]) or 0
		local g = tonumber(list[2]) or 0
		local b = tonumber(list[3]) or 0
		return Color3.new(r/255,g/255, b/255)
	elseif type == "UDim2" then
		local list = Split(string.gsub(string.gsub(value, "{", ""),"}",""),",")
		if #list < 4 then return nil end
		local xScale = tonumber(list[1]) or 0
		local xOffset = tonumber(list[2]) or 0
		local yScale = tonumber(list[3]) or 0
		local yOffset = tonumber(list[4]) or 0
		return UDim2.new(xScale, xOffset, yScale, yOffset)
	elseif type == "Content" then
		if tonumber(value) ~= nil then
			value = ContentUrl .. value
		end
		return value
	elseif type == "float" or type == "int" or type == "double" then
		return tonumber(value)
	elseif type == "string" then
		return value
	elseif type == "NumberRange" then
		local list = Split(value,",")
		if #list == 1 then
			if tonumber(list[1]) == nil then return nil end
			local newVal = tonumber(list[1]) or 0
			return NumberRange.new(newVal)
		end
		if #list < 2 then return nil end
		local x = tonumber(list[1]) or 0
		local y = tonumber(list[2]) or 0
		return NumberRange.new(x,y)
	else
		return nil
	end
end

