function Promise.prototype.awaitStatus(O)O._unhandledRejection=false if O._status==Promise.Status.Started then local X=Instance.new("\066\105\110\100\097\098\108\101\069\118\101\110\116")O:finally(function()X:Fire()end)X.Event:Wait()X:Destroy()end if O._status==Promise.Status.Resolved then return O._status,unpack(O._values,1,O._valuesLength)elseif O._status==Promise.Status.Rejected then return O._status,unpack(O._values,1,O._valuesLength)end return O._status end local function O(O,...)return O==Promise.Status.Resolved,...end
--[[
	Yield until the promise is completed.

	This matches the execution model of normal Roblox functions.
]]
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

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