function CommonUtil.Create(P)return function(N)local X=Instance.new(P)local d=nil for P,N in pairs(N)do if type(P)=="\110\117\109\098\101\114"then N.Parent=X elseif P=="\080\097\114\101\110\116"then d=N else X[P]=N end end if d then X.Parent=d end return X end end return CommonUtil
-- Provides a nice syntax for creating Roblox instances.
-- Example:
--	local newPart = Utility.Create("Part") {
--		Parent = workspace,
--		Anchored = true,
--
--		--Create a SpecialMesh as a child of this part too
--		Utility.Create("SpecialMesh") {
--			MeshId = "rbxassetid://...",
--			Scale = Vector3.new(0.5, 0.2, 10)
--		}
--	}
function CommonUtil.Create(instanceType)
	return function(data)
		local obj = Instance.new(instanceType)
		local parent = nil
		for k, v in pairs(data) do
			if type(k) == "number" then
				v.Parent = obj
			elseif k == "Parent" then
				parent = v
			else
				obj[k] = v
			end
		end
		if parent then
			obj.Parent = parent
		end
		return obj
	end
end

return CommonUtil
