Coroutine = {}; function Coroutine.New(functionName) routine = coroutine.create(functionName); return routine; end function Coroutine.Start(routine, ...) if type(routine)=="thread" then if coroutine.resume(routine, unpack(arg)) then return true; else return false; end else return false; end end function Coroutine.Continue(routine) if type(routine)=="thread" then if coroutine.resume(routine) then return true; else return false; end else return false; end end function Coroutine.Status(routine) return coroutine.status(routine); end function Coroutine.SuspendThisRoutine(arg) coroutine.yield(arg); end