function t.instanceOf(b,V)assert(t.string(b))local r if V~=nil then r=t.children(V)end return function(V)local g,T=t.Instance(V)if not g then return false,T or""end if V.ClassName~=b then return false,string.format("\037\115 \101\120\112\101\099\116\101\100\044 \103\111\116 \037\115",b,V.ClassName)end if r then local b,g=r(V)if not b then return false,g end end return true end end t.instance=t.instanceOf

function t.instanceOf(className, childTable)
	assert(t.string(className))

	local childrenCheck
	if childTable ~= nil then
		childrenCheck = t.children(childTable)
	end

	return function(value)
		local instanceSuccess, instanceErrMsg = t.Instance(value)
		if not instanceSuccess then
			return false, instanceErrMsg or ""
		end

		if value.ClassName ~= className then
			return false, string.format("%s expected, got %s", className, value.ClassName)
		end

		if childrenCheck then
			local childrenSuccess, childrenErrMsg = childrenCheck(value)
			if not childrenSuccess then
				return false, childrenErrMsg
			end
		end

		return true
	end
end

t.instance = t.instanceOf
