function ValueBaseUtils.getOrCreateValue(f,S,v,h)assert(typeof(f)=="\073\110\115\116\097\110\099\101","\066\097\100 \097\114\103\117\109\101\110\116 \'\112\097\114\101\110\116\'")assert(type(S)=="\115\116\114\105\110\103","\066\097\100 \097\114\103\117\109\101\110\116 \'\105\110\115\116\097\110\099\101\084\121\112\101\'")assert(type(v)=="\115\116\114\105\110\103","\066\097\100 \097\114\103\117\109\101\110\116 \'\110\097\109\101\'")local l=f:FindFirstChild(v)if l then if not l:IsA(S)then warn(("\091\086\097\108\117\101\066\097\115\101\085\116\105\108\115\046\103\101\116\079\114\067\114\101\097\116\101\086\097\108\117\101\093 - \086\097\108\117\101 \111\102 \116\121\112\101 \037\113 \111\102 \110\097\109\101 \037\113 \105\115 \111\102 \116\121\112\101 \037\113 \105\110 \037\115 \105\110\115\116\101\097\100"):format(S,v,l.ClassName,l:GetFullName()))end return l else local l=Instance.new(S)l.Name=v l.Value=h l.Parent=f return l end end

function ValueBaseUtils.getOrCreateValue(parent, instanceType, name, defaultValue)
	assert(typeof(parent) == "Instance", "Bad argument 'parent'")
	assert(type(instanceType) == "string", "Bad argument 'instanceType'")
	assert(type(name) == "string", "Bad argument 'name'")

	local foundChild = parent:FindFirstChild(name)
	if foundChild then
		if not foundChild:IsA(instanceType) then
			warn(("[ValueBaseUtils.getOrCreateValue] - Value of type %q of name %q is of type %q in %s instead")
				:format(instanceType, name, foundChild.ClassName, foundChild:GetFullName()))
		end

		return foundChild
	else
		local newChild = Instance.new(instanceType)
		newChild.Name = name
		newChild.Value = defaultValue
		newChild.Parent = parent

		return newChild
	end
end
