local function O(O,Z,...)if not Z then local Z=...error(debug.traceback(O,Z),2)end if coroutine.status(O)~="\100\101\097\100"then error(debug.traceback(O,"\065\116\116\101\109\112\116\101\100 \116\111 \121\105\101\108\100 \105\110\115\105\100\101 \099\104\097\110\103\101\100 \101\118\101\110\116\033"),2)end return...end local function Z(Z,...)local p=coroutine.create(Z)return O(p,coroutine.resume(p,...))end return Z
--[[
	Calls a function and throws an error if it attempts to yield.

	Pass any number of arguments to the function after the callback.

	This function supports multiple return; all results returned from the
	given function will be returned.
]]

local function resultHandler(co, ok, ...)
	if not ok then
		local message = (...)
		error(debug.traceback(co, message), 2)
	end

	if coroutine.status(co) ~= "dead" then
		error(debug.traceback(co, "Attempted to yield inside changed event!"), 2)
	end

	return ...
end

local function NoYield(callback, ...)
	local co = coroutine.create(callback)

	return resultHandler(co, coroutine.resume(co, ...))
end

return NoYield