if ((button(2) and 16)==16) and (sg==0) then かな? 優先順位的なエラー?