function t.instanceOf(Y,Q)assert(t.string(Y))local J if Q~=nil then J=t.children(Q)end return function(Q)local p=t.Instance(Q)if not p then return false end if Q.ClassName~=Y then return false end if J then local Y=J(Q)if not Y then return false 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 = t.Instance(value)
		if not instanceSuccess then
			return false
		end

		if value.ClassName ~= className then
			return false
		end

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

		return true
	end
end

t.instance = t.instanceOf
