Arras.io Clone script

Right-click on any player and you become his clone! Then you can right-click anywhere again to stop being one. You can adjust the maximum distance from the clone host with the + and - keys. This script allows you to do multiboxing even without a VPN, as well as giving other players bots.

当前为 2025-11-17 提交的版本,查看 最新版本

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name        Arras.io Clone script
// @namespace   LA3T
// @match       *://arras.io/*
// @grant       none
// @version     1.0
// @author      LA3T
// @description Right-click on any player and you become his clone! Then you can right-click anywhere again to stop being one. You can adjust the maximum distance from the clone host with the + and - keys. This script allows you to do multiboxing even without a VPN, as well as giving other players bots.
// @run-at       document-start
// @require      https://greatest.deepsurf.us/scripts/434599-apm/code/APM.js?version=983214
// @license      MIT
// ==/UserScript==


arras.hijack().then((sock) => {
  let ownerName = null;
  let ownerAngle = null;
  let ownerSize = null;
  let ownerX = null;
  let ownerY = null;
  let ownerGuns = 0;

  let doll = new arras.UpdateParser(true);
  let maxDelta = 55;
  let mx = 0;
  let my = 0;
  let flags = 0;

  sock.hookMsg((data) => {
    if (data[0] === 'u') {
      doll.parse(data);



      if (ownerName !== null) {
        doll.entities.forEach((cur, ind, arr) => {
          if (cur.name === ownerName && cur.size === ownerSize && cur.guns.length === ownerGuns) {
            let flag = 0;
            ownerAngle = (cur.facing / 2) * Math.PI / 180;
            ownerX = cur.x;
            ownerY = cur.y;
            if (Math.abs(ownerX - doll.camera.x) > maxDelta) {
              if (ownerX > doll.camera.x) {
                flag |= 0b0001000;
              } else {
                flag |= 0b0000100;
              }
            }

            if (Math.abs(ownerY - doll.camera.y) > maxDelta) {
              if (ownerY > doll.camera.y) {
                flag |= 0b0000010;
              } else {
                flag |= 0b0000001;
              }
            }


            let distance = 999;
            let newMx = Math.cos(ownerAngle) * distance;
            let newMy = Math.sin(ownerAngle) * distance;

            flags = flag;
            sock.talk('C', newMx, newMy, flag);
          }
        });
      }
    }
  });

  sock.hookSend((data) => {
    if (data[0] === 'C') {
      let flag2 = data[3];
      flag2 &= 0b1110000;
      let rightMouseOn = flag2 & 0b1000000;
      if (rightMouseOn) {
        mx = data[1];
        my = data[2];
        ownerName = null;
        ownerAngle = null;
        ownerSize = null;
        doll.entities.forEach((cur, ind, arr) => {
          let clickX = doll.camera.x + mx;
          let clickY = doll.camera.y + my;

          let deltaX = clickX - cur.x;
          let deltaY = clickY - cur.y;

          if (Math.sqrt(deltaX * deltaX + deltaY * deltaY) <= cur.size) {
            ownerName = cur.name;
            ownerAngle = cur.facing;
            ownerSize = cur.size;
            ownerGuns = cur.guns.length;
            ownerX = cur.x;
            ownerY = cur.y;



            sock.receive('m', ownerName + " is your owner now!");
          }
        });
      }

      if (ownerName !== null) {

        let distance = 999;
        let newMx = Math.cos(ownerAngle) * distance;
        let newMy = Math.sin(ownerAngle) * distance;

        return ['C', newMx, newMy, flags];
      }
    }
  });


  window.addEventListener("keydown", (key) => {
    switch (key.code) {
      case "Equal":
        maxDelta += 1;
        sock.receive('m', "Max distance is "+maxDelta+" now!");
      break;


      case "Minus":
        maxDelta -= 1;
        sock.receive('m', "Max distance is "+maxDelta+" now!");
      break;
    };
  });
});