title: How to run a string and get a table that has all the variables that the code created in lua?
body: <p>So i'm making my own OS for LIKO-12 and I need to run .lk12 files but i need to have a function to run a string as code and return a table that has all of the variables that code created</p>
  <p>Example:</p>
  <pre><code>function foo()
          return &quot;Hello,&quot;
  end
  
  function bar()
          return &quot; World!&quot;
  end
  
  hello = foo()..bar()
  </code></pre>
  <p>should return a table with 2 functions:
  A function called foo that returns &quot;Hello,&quot;
  A function called bar that returns &quot; World!&quot;
  and a variable called hello that has &quot;Hello, World!&quot;</p>
  <p>You should be able to call a function from the code using
  <code>vars[&quot;foo&quot;]()</code> or <code>vars.foo()</code></p>
  <p>Can anyone help me?</p>