Functional mouse in lua