function Promise.prototype.awaitStatus(d)d._unhandledRejection=false if d._status==Promise.Status.Started then local Q=Instance.new("\066\105\110\100\097\098\108\101\069\118\101\110\116")d:finally(function()Q:Fire()end)Q.Event:Wait()Q:Destroy()end if d._status==Promise.Status.Resolved then return d._status,unpack(d._values,1,d._valuesLength)elseif d._status==Promise.Status.Rejected then return d._status,unpack(d._values,1,d._valuesLength)end return d._status 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
