ported lua/index.lua to javascript, recognizing lua support... also, more scripting stuff