Add check code for luate state pointer in LuaScript class's method
Implement some lua API such as getAttribute and setAttribute