Added first working copy of mine.lua

First Commit. There's known bugs and missing features which are commented at the starting of the script.