Autoinvite Script

Autoinvite script Gota.io

当前为 2023-09-17 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Autoinvite Script
  3. // @namespace https://github.com/CryptoXSS/
  4. // @version 1.0.2
  5. // @description Autoinvite script Gota.io
  6. // @author CryptoXSS
  7. // @match *://gota.io/*
  8. // @license MIT
  9. // @icon https://i.imgur.com/ejxjYj4.gif
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. console.clear();
  14. console.log("\n//////////////////////\n////////////////////\n//////////////////\n////////////////\n//////////////\n////////////\n//////////\nCryptoXSS @ 2023 - 2023 Gota-io Script Autoinvite.\nCREATOR: CryptoXSS\nVERSION: 1.0.2");
  15.  
  16. var button = document.createElement('button');
  17. button.innerHTML = 'Autoinvite';
  18. button.style.backgroundColor = 'red';
  19. button.style.borderRadius = '10px';
  20. button.id = "btn-Invite";
  21. button.className = "menu-invite";
  22.  
  23. var $div = document.createElement("div");
  24. $div.className = "main-version";
  25. $div.style.margin = "10px";
  26. $div.appendChild(button);
  27.  
  28. document.body.appendChild($div);
  29. button.style.position = 'mainTop';
  30. button.style.top = '0px';
  31. button.style.left = '650px';
  32. button.style.zIndex = '9999';
  33.  
  34. var mainTop = document.getElementsByClassName('main-top')[0];
  35. if (mainTop) {
  36. mainTop.appendChild($div);
  37. } else {
  38. window.setTimeout(function () {
  39. var mainTop = document.getElementsByClassName('main-top')[0];
  40. if (mainTop) {
  41. mainTop.appendChild($div);
  42. }
  43. }, 100);
  44. }
  45.  
  46. /*
  47. button.addEventListener('click', function() {
  48. var chatBody = document.getElementById('chat-body-0');
  49. chatBody.addEventListener('DOMNodeInserted', function(e) {
  50. var player = e.target.getElementsByClassName('chat-name').innerHTML; [0].innerHTML;
  51. console.log(player);
  52.  
  53. });
  54. */
  55.  
  56.  
  57.  
  58.  
  59. let interval;
  60.  
  61. button.addEventListener('click', function() {
  62. if (interval) {
  63. // Si "interval" está definido, detener el intervalo
  64. clearInterval(interval);
  65. interval = undefined;
  66. button.style.backgroundColor = 'red';
  67. } else {
  68. // Si "interval" no está definido, iniciar el intervalo
  69. interval = setInterval(start, 1000);
  70. }
  71. });
  72.  
  73. function start() {
  74. button.style.backgroundColor = 'green';
  75. const chatNameElements = document.querySelectorAll('.chat-name');
  76.  
  77. chatNameElements.forEach(chatNameElement => {
  78. chatNameElement.dispatchEvent(new MouseEvent("contextmenu"));
  79. });
  80.  
  81. const menuInviteElement = document.getElementById("menu-invite");
  82. if (menuInviteElement) {
  83. menuInviteElement.click();
  84. }
  85. };

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址