Pegaxy Auto Play

Joga com os cavalin automatico

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==INFO== Contact [email protected]
//          20 usdt
//          0xe1b83FC311438367556cC6A0bB8E96b0961b450E
//          Hasta 4 cuentas por conexion de red, en una sola pc.
//          https://www.youtube.com/watch?v=Lwacxl7WvUY
// ==UserScript==
// @name         Pegaxy Auto Play
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  Joga com os cavalin automatico
// @author       LuqDragon
// @match        https://play.pegaxy.io/racing/finish*
// @match        https://play.pegaxy.io/racing/pick-pega*
// @icon         https://www.google.com/s2/favicons?domain=pegaxy.io
// @grant        none
// @license      MIT
// ==/UserScript==

function sleep(ms) {
  return new Promise(resolve => setTimeout(resolve, ms));
}

const $ = (elem) => {
	return document.querySelector(elem);
};

const $a = (elem) => {
	return document.querySelectorAll(elem);
};

(async function() {
    var pegaId = 0;
    while(true){
        if(!$(".viewAlert")){
            var botao = $(".button-game.pinks");
            var botao2 = $(".viewButton");

            if(botao && (botao.innerText == "NEXT MATCH" || botao.innerText == "Find another match")){
				pegaId = 0;
                botao.click();
			}
            else if(botao2 && botao2.innerText == "START")
                botao2.click();
        }
        else {
			var botao = $(".button-game.pinks");
            if(botao)
				botao.click();

            botao = $(".button-game.primary");
            if(botao && botao.innerText == "I understand"){
                botao.click();
				pegaId++;
				var pegaxy = $a(".item-pega")[pegaId];
				if(pegaxy)
                	pegaxy.click()
				else {
					console.log("Recarregamento da página agendado para daqui 5 minutos!");
					setTimeout(() => {
						window.location.reload();
					}, 300000);
					break;
				}
            }
        }
        await sleep(1000);
    }
})();