Autoinvite Script

Autoinvite script Gota.io

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

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

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

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

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name        Autoinvite Script
// @namespace   https://github.com/CryptoXSS/
// @version     1.0.2
// @description Autoinvite script Gota.io
// @author      CryptoXSS
// @match       *://gota.io/*
// @license MIT 
// @icon        https://i.imgur.com/ejxjYj4.gif
// @grant       none
// ==/UserScript==

console.clear();
console.log("\n//////////////////////\n////////////////////\n//////////////////\n////////////////\n//////////////\n////////////\n//////////\nCryptoXSS @ 2023 - 2023 Gota-io Script Autoinvite.\nCREATOR: CryptoXSS\nVERSION: 1.0.2");

var button = document.createElement('button');
button.innerHTML = 'Autoinvite';
button.style.backgroundColor = 'red';
button.style.borderRadius = '10px';
button.id = "btn-Invite";
button.className = "menu-invite";

var $div = document.createElement("div");
$div.className = "main-version";
$div.style.margin = "10px";
$div.appendChild(button);

document.body.appendChild($div);
button.style.position = 'mainTop';
button.style.top = '0px';
button.style.left = '650px';
button.style.zIndex = '9999';

var mainTop = document.getElementsByClassName('main-top')[0];
if (mainTop) {
   mainTop.appendChild($div);
} else {
   window.setTimeout(function () {
      var mainTop = document.getElementsByClassName('main-top')[0];
      if (mainTop) {
         mainTop.appendChild($div);
      }
   }, 100);
}

/*
button.addEventListener('click', function() {
var chatBody = document.getElementById('chat-body-0');
chatBody.addEventListener('DOMNodeInserted', function(e) {
  var player = e.target.getElementsByClassName('chat-name').innerHTML; [0].innerHTML;
  console.log(player);

});
*/




let interval;

button.addEventListener('click', function() {
  if (interval) {
    // Si "interval" está definido, detener el intervalo
    clearInterval(interval);
    interval = undefined;
    button.style.backgroundColor = 'red';
  } else {
    // Si "interval" no está definido, iniciar el intervalo
    interval = setInterval(start, 1000);
  }
});

function start() {
button.style.backgroundColor = 'green';
  const chatNameElements = document.querySelectorAll('.chat-name');

  chatNameElements.forEach(chatNameElement => {
    chatNameElement.dispatchEvent(new MouseEvent("contextmenu"));
  });

  const menuInviteElement = document.getElementById("menu-invite");
  if (menuInviteElement) {
    menuInviteElement.click();
  }
};