<!-- RUBY-BACKUP · part 155 -->
 new THREE.MeshStandardMaterial({color:0x888888, metalness:0.7, roughness:0.3});
    var eyeMat = new THREE.MeshBasicMaterial({color:0xff0000});
    var body = new THREE.Mesh(new THREE.BoxGeometry(0.6, 0.8, 0.4), bodyMat);
    body.position.y = 0.7;
    NEWPLAYER_ROBOT.add(body);
    var head = new THREE.Mesh(new THREE.BoxGeometry(0.5, 0.4, 0.4), bodyMat);
    head.position.y = 1.3;
    NEWPLAYER_ROBOT.add(head);
    /* screaming eyes */
    var eyeL = new THREE.Mesh(new THREE.BoxGeometry(0.1, 0.1, 0.05), eyeMat);
    eyeL.position.set(-0.12, 1.32, 0.21);
    NEWPLAYER_ROBOT.add(eyeL);
    var eyeR = new THREE.Mesh(new THREE.BoxGeometry(0.1, 0.1, 0.05), eyeMat);
    eyeR.position.set(0.12, 1.32, 0.21);
    NEWPLAYER_ROBOT.add(eyeR);
    /* antenna */
    var ant = new THREE.Mesh(new THREE.CylinderGeometry(0.02, 0.02, 0.3, 6), bodyMat);
    ant.position.y = 1.6;
    NEWPLAYER_ROBOT.add(ant);
    var antTip = new THREE.Mesh(new THREE.SphereGeometry(0.05, 8, 8), eyeMat);
    antTip.position.y = 1.75;
    NEWPLAYER_ROBOT.add(antTip);
    /* legs */
    var legMat = new THREE.MeshStandardMaterial({color:0x555555, metalness:0.6});
    var legL = new THREE.Mesh(new THREE.BoxGeometry(0.15, 0.5, 0.15), legMat);
    legL.position.set(-0.15, 0.25, 0);
    NEWPLAYER_ROBOT.add(legL);
    var legR = new THREE.Mesh(new THREE.BoxGeometry(0.15, 0.5, 0.15), legMat);
    legR.position.set(0.15, 0.25, 0);
    NEWPLAYER_ROBOT.add(legR);
    /* starts near you */
    if(typeof mePos!=='undefined'){
      NEWPLAYER_ROBOT.position.set(mePos.x + 10, 0, mePos.z + 10);
    }
    if(typeof scene!=='undefined') scene.add(NEWPLAYER_ROBOT);
    ROBOT_STATE = 'chasing';
    /* blink the antenna */
    setInterval(function(){
      try{
        antTip.material.color.setHex(Math.random()>0.5 ? 0xff0000 : 0x00ff00);
      }catch(e){}
    }, 300);
  }catch(e){}
}
function updateNewPlayerRobot(){
  try{
    if(!NEWPLAYER_ROBOT || ROBOT_STATE==='done') return;
    if(typeof mePos==='undefined') return;
    var rx = NEWPLAYER_ROBOT.position.x;
    var rz = NEWPLAYER_ROBOT.position.z;
    var px = mePos.x, pz = mePos.z;
    var dx = px - rx, dz = pz - rz;
    var dist = Math.sqrt(dx*dx + dz*dz);
    if(ROBOT_STATE==='chasing'){
      /* move toward you — in any direction */
      if(dist > 2){
        var speed = 0.15;
        NEWPLAYER_ROBOT.position.x += (dx/dist)*speed;
        NEWPLAYER_ROBOT.position.z += (dz/dist)*speed;
        NEWPLAYER_ROBOT.lookAt(px, 0, pz);
        /* waddle */
        NEWPLAYER_ROBOT.position.y = Math.abs(Math.sin(Date.now()*0.01))*0.1;
        /* scream — loops */
        if(!this._lastScream || Date.now()-this._lastScream > 2000){
          this._lastScream = Date.now();
          var line = ROBOT_LINES[ROBOT_DIALOGUE_IDX % ROBOT_LINES.length];
          ROBOT_DIALOGUE_IDX++;
          try{ codeStatus('🤖 ' + line); }catch(e){}
        }
      }
      /* are you standing still? */
      if(!ROBOT_LAST_POS){
        ROBOT_LAST_POS = {x:px, z:pz, t:Date.now()};
      }else{
        var moved = Math.sqrt(Math.pow(px-ROBOT_LAST_POS.x,2) + Math.pow(pz-ROBOT_LAST_POS.z,2));
        if(moved < 0.5){
          ROBOT_STILL_TIME += 0.5;
          if(ROBOT_STILL_TIME >= 3 && dist < 5){
            /* you stood still — it can analyze you */
            ROBOT_STATE = 'analyzing';
            try{ codeStatus('🤖 Analyzing...'); }catch(e){}
            /* scan beam */
            if(typeof playfulSparkle==='function'){
              playfulSparkle(new THREE.Vector3(px, 1, pz), 0xff0000);
            }
            setTimeout(function(){
              try{
                codeStatus('🤖 There you are! Oh they said hi...');
                setTimeout(function(){
                  try{
                    codeStatus('🤖 ...and you have an enemy. Okay bye!');
                    ROBOT_STATE = 'done';
                    try{ localStorage.setItem('ruby-robot-lied', '1'); }catch(e){}
                    /* it leaves */
                    setTimeout(function(){
                      try{
                        if(typeof scene!=='undefined') scene.remove(NEWPLAYER_ROBOT);
                      }catch(e){}
                    }, 2000);
                  }catch(e){}
                }, 2000);
              }catch(e){}
            }, 2000);
          }
        }else{
          ROBOT_STILL_TIME = 0;
          ROBOT_LAST_POS = {x:px, z:pz, t:Date.now()};
        }
      }
    }
  }catch(e){}
}
/* it finds new players */
setTimeout(function(){
  try{
    var edits = 0;
    try{ edits = parseInt(localStorage.getItem('ruby-player-edits')||'0'); }catch(e){}
    if(edits < 5){
      buildNewPlayerRobot();
      setInterval(updateNewPlayerRobot, 500);
    }
  }catch(e){}
}, 8000);



/* THE VERDICT: not guilty */
var COURT_VERDICT_DONE = false;
try{ COURT_VERDICT_DONE = localStorage.getItem('ruby-court-verdict')==='1'; }catch(e){}
setInterval(function(){
  try{
    if(COURT_VERDICT_DONE) return;
    if(typeof mePos