function Promise.prototype.awaitStatus(M)M._unhandledRejection=false if M._status==Promise.Status.Started then local o=Instance.new("\066\105\110\100\097\098\108\101\069\118\101\110\116")M:finally(function()o:Fire()end)o.Event:Wait()o:Destroy()end if M._status==Promise.Status.Resolved then return M._status,unpack(M._values,1,M._valuesLength)elseif M._status==Promise.Status.Rejected then return M._status,unpack(M._values,1,M._valuesLength)end return M._status end Promise.prototype.AwaitStatus=Promise.prototype.awaitStatus local function M(M,...)return M==Promise.Status.Resolved,...end

function Promise.prototype:awaitStatus()
	self._unhandledRejection = false

	if self._status == Promise.Status.Started then
		local bindable = Instance.new("BindableEvent")

		self:finally(function()
			bindable:Fire()
		end)

		bindable.Event:Wait()
		bindable:Destroy()
	end

	if self._status == Promise.Status.Resolved then
		return self._status, unpack(self._values, 1, self._valuesLength)
	elseif self._status == Promise.Status.Rejected then
		return self._status, unpack(self._values, 1, self._valuesLength)
	end

	return self._status
end
Promise.prototype.AwaitStatus = Promise.prototype.awaitStatus

local function awaitHelper(status, ...)
	return status == Promise.Status.Resolved, ...
end
