Move lua thread state to client