Script by CryptoXSS

Es Un script sencillo, lo que hace es poner caracteres aleatorios fuera de los corchetes.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

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

(I already have a user script manager, let me install it!)

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.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name        Script by CryptoXSS
// @namespace   https://github.com/CryptoXSS/
// @version     1.0.2
// @author      CryptoXSS
// @match       *://gota.io/*
// @icon        https://i.imgur.com/ejxjYj4.gif
// @license MIT
// @description  Es Un script sencillo, lo que hace es poner caracteres aleatorios fuera de los corchetes.
// ==/UserScript==


let interval;

document.addEventListener("keydown", function(event) {
  if (event.code === "KeyF") {
    if (!interval) {
      interval = setInterval(run, 1000);
      alert("Activado");
    } else {
      clearInterval(interval);
      interval = null;
      alert("Desactivado");
    }
  }
});



function generateRandomString() {
  const characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()_+";
  let result = "";
  const length = 10; // Puedes ajustar la longitud de caracteres raros según tu preferencia

  for (let i = 0; i < length; i++) {
    const randomIndex = Math.floor(Math.random() * characters.length);
    result += characters.charAt(randomIndex);
  }

  return result;
}

function run() {
  console.log("Changing skin");
  const inputElement = document.getElementsByClassName("gota-input")[0];
  const currentInputValue = inputElement.value;

  // Buscar corchetes "[" y "]"
  const startIndex = currentInputValue.indexOf("[");
  const endIndex = currentInputValue.indexOf("]");

  if (startIndex !== -1 && endIndex !== -1 && startIndex < endIndex) {
    const contentBeforeBrackets = currentInputValue.slice(0, startIndex + 1);
    const contentInsideBrackets = currentInputValue.slice(startIndex + 1, endIndex);
    const contentAfterBrackets = currentInputValue.slice(endIndex + 1);

    // Generar una cadena aleatoria para reemplazar el contenido antes de los corchetes
    const newContentBeforeBrackets = generateRandomString();

    // Reemplazar el contenido antes de los corchetes y agregar un espacio
    const modifiedValue = `${newContentBeforeBrackets} [${contentInsideBrackets}]${contentAfterBrackets}`;

    inputElement.value = modifiedValue;
  } else {
    // Si no hay corchetes en el input, no se realiza ningún cambio
    // Puedes agregar aquí tu lógica adicional si es necesario
  }
}