function InsertServiceUtils.promiseAsset(a)assert(type(a)=="\110\117\109\098\101\114","\066\097\100 \097\115\115\101\116\073\100")if a==0 then return Promise.rejected()end return Promise.spawn(function(T,X)local F local J,r=pcall(function()F=InsertService:LoadAsset(a)end)if not J then return X(r)end if typeof(F)~="\073\110\115\116\097\110\099\101"then return X("\082\101\115\117\108\116 \119\097\115 \110\111\116 \097\110 \105\110\115\116\097\110\099\101")end T(F)end)end return InsertServiceUtils

function InsertServiceUtils.promiseAsset(assetId)
	assert(type(assetId) == "number", "Bad assetId")

	if assetId == 0 then
		return Promise.rejected()
	end

	return Promise.spawn(function(resolve, reject)
		local result
		local ok, err = pcall(function()
			result = InsertService:LoadAsset(assetId)
		end)

		if not ok then
			return reject(err)
		end
		if typeof(result) ~= "Instance" then
			return reject("Result was not an instance")
		end

		resolve(result)
	end)
end

return InsertServiceUtils
