Skip to content

Instantly share code, notes, and snippets.

@AngelGuerra
Created January 17, 2022 15:13
Show Gist options
  • Save AngelGuerra/5334811a39c348207da8f65c6766c4e9 to your computer and use it in GitHub Desktop.
Save AngelGuerra/5334811a39c348207da8f65c6766c4e9 to your computer and use it in GitHub Desktop.
Código para "jugar" en modo automático al looptab -> https://looptap.vasanthv.com/
/**
* @description Código para "jugar" en modo automático al looptab. Dale una
* lección a tu colega gamer con este "automatismo". Simplemente copia este
* código, abre la consola en la página del juego y pégalo.
* ¿Más aburrido? Sí
* ¿Ganarás? También.
* @link https://looptap.vasanthv.com/
* @version 2021-01-17
*/
const spacebarEvent = new Event("keypress");
spacebarEvent.which = spacebarEvent.keyCode = 32;
spacebarEvent.code = "Backspace";
setInterval(() => {
const ballAngle = loopTapApp.getBallAngle();
if (
ballAngle + 6 > loopTapApp._data.arc[0] &&
ballAngle - 6 < loopTapApp._data.arc[1]
) {
window.dispatchEvent(spacebarEvent);
}
}, 100);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment