Raw Source
Dℝ∃wX / DINOcheat: hack/cheat dino google & chrome (bot,rapide,score,imortel...)

// ==UserScript==
// @name            DINOcheat: hack/cheat dino google & chrome (bot,rapide,score,imortel...)
// @name:es         DINOcheat: hack/cheat dino google & chrome (bot, velocidad, puntaje, inmortalidad...)
// @name:en         DINOcheat: hack/cheat dino google & chrome (bot,speed,score,imortality...)
// @name:ja         DINOcheat: hack/cheat dino google & chrome (ボット、速度、スコア、不死身...)
// @name:it         DINOcheat: hack/cheat dino google & chrome (bot, velocità, punteggio, immortalità...)
// @namespace       http://tampermonkey.net/
// @version         2024-02-14-1.1.6
// @description     Utiliser de super fonctionnalités !
// @description:en  Experience super features!
// @description:es  ¡Experimenta características superiores!
// @description:ja  超機能を体験してください!
// @description:it  Usa funzionalità super!
// @author       Dℝ∃wX
// @match        *://dinorunner.com/*
// @match        *://elgoog.im/t-rex/v2/*
// @match        *://chromedino.com/*
// @match        *://dino-chrome.com/*
// @match        *://tuckercraig.com/dino/*
// @match        *://elgoog.im/t-rex/*
// @match        *://offline-dino-game.firebaseapp.com/
// @match        *://www.dinogame.net/*
// @match        *://nointernetgame.com/*
// @match        *://chromedino.io/
// @match        *://trex-runner.com/*
// @grant        none
// @license      Apache-2.0
// @downloadURL https://update.greasyfork.org/scripts/486972/DINOcheat%3A%20hackcheat%20dino%20google%20%20chrome%20%28bot%2Crapide%2Cscore%2Cimortel%29.user.js
// @updateURL https://update.greasyfork.org/scripts/486972/DINOcheat%3A%20hackcheat%20dino%20google%20%20chrome%20%28bot%2Crapide%2Cscore%2Cimortel%29.meta.js
// ==/UserScript==

(function() {
    'use strict';

if (window.location.hostname === "dinorunner.com") {

    const errorContainer = document.createElement('div');
    errorContainer.style.position = 'fixed';
    errorContainer.style.top = '50%';
    errorContainer.style.left = '50%';
    errorContainer.style.transform = 'translate(-50%, -50%)';
    errorContainer.style.background = 'rgba(255, 255, 255, 0.9)';
    errorContainer.style.border = '1px solid black';
    errorContainer.style.padding = '20px';
    errorContainer.style.fontSize = '20px';
    errorContainer.style.zIndex = '9999';
    errorContainer.innerHTML = '<span style="cursor: pointer; color: red;">Close</span><br>(Dℝ∃wX) Hello, sorry but this script does not work on this site. I advise you to use this site <a href="https://dino-chrome.com/" target="_blank">https://dino-chrome.com/</a>';

    document.body.appendChild(errorContainer);

    errorContainer.querySelector('span').addEventListener('click', function() {
        document.body.removeChild(errorContainer);
    });

    return;
}

    let windowElement = null;


    function injectBotCode() {
        const botCode = `
           function TrexRunnerBot() {
      const makeKeyArgs = (keyCode) => {
        const preventDefault = () => void 0;
        return {keyCode, preventDefault};
      };
      const upKeyArgs = makeKeyArgs(38);
      const downKeyArgs = makeKeyArgs(40);
      const startArgs = makeKeyArgs(32);
      if (!Runner().playing) {
        Runner().onKeyDown(startArgs);
        setTimeout(() => {
          Runner().onKeyUp(startArgs);
        }, 500);
      }
      function conquerTheGame() {
        if (!Runner || !Runner().horizon.obstacles[0]) return;
        const obstacle = Runner().horizon.obstacles[0];
        if (obstacle.typeConfig && obstacle.typeConfig.type === 'SNACK') return;
        if (needsToTackle(obstacle) && closeEnoughToTackle(obstacle)) tackle(obstacle);
      }
      function needsToTackle(obstacle) {
        return obstacle.yPos !== 50;
      }
      function closeEnoughToTackle(obstacle) {
        return obstacle.xPos <= Runner().currentSpeed * 18;
      }
      function tackle(obstacle) {
        if (isDuckable(obstacle)) {
          duck();
        } else {
          jumpOver(obstacle);
        }
      }
      function isDuckable(obstacle) {
        return obstacle.yPos === 50;
      }
      function duck() {
        Runner().onKeyDown(downKeyArgs);
        setTimeout(() => {
          Runner().onKeyUp(downKeyArgs);
        }, 500);
      }
      function jumpOver(obstacle) {
        if (isNextObstacleCloseTo(obstacle))
          jumpFast();
        else
          Runner().onKeyDown(upKeyArgs);
      }
      function isNextObstacleCloseTo(currentObstacle) {
        const nextObstacle = Runner().horizon.obstacles[1];

        return nextObstacle && nextObstacle.xPos - currentObstacle.xPos <= Runner().currentSpeed * 42;
      }
      function jumpFast() {
        Runner().onKeyDown(upKeyArgs);
        Runner().onKeyUp(upKeyArgs);
      }
      return {conquerTheGame: conquerTheGame};
    }
    let bot = TrexRunnerBot();
    let botInterval = setInterval(bot.conquerTheGame, 2);
        `;


        eval(botCode);
    }


    function injectDistanceCode() {
        const distanceCode = "Runner.instance_.distanceRan = Runner.instance_.distanceRan + 1000 / Runner.instance_.distanceMeter.config.COEFFICIENT";


        eval(distanceCode);
    }


    function createWindow() {
        if (!windowElement) {
            windowElement = document.createElement('div');
            windowElement.style.position = 'fixed';
            windowElement.style.top = '50px';
            windowElement.style.left = '50px';
            windowElement.style.width = '300px';
            windowElement.style.height = '225px';
            windowElement.style.background = 'white';
            windowElement.style.border = '1px solid black';
            windowElement.style.padding = '10px';
            windowElement.style.zIndex = '9999';

            windowElement.innerHTML = `
<div style="text-align: center; font-weight: bold; margin-bottom: 10px;">Menu (t)</div>
Jump height: "h" <br>
Speed adjustment: "v" <br>
Immortality: "i" <br>
Walk in the air: "a" + "↑" <br>
Choose score: "k" <br>
BotJumpAuto: "b" <br>
Score + 1000: "s" <br>
            `;

            document.body.appendChild(windowElement);
        } else {

            document.body.removeChild(windowElement);
            windowElement = null;
        }
    }


    document.addEventListener('keydown', function(event) {
        if (event.key === 'b') {
            injectBotCode();
        }
    });


    document.addEventListener('keydown', function(event) {
        if (event.key === 's') {
            injectDistanceCode();
        }
    });


    document.addEventListener('keydown', function(event) {
        if (event.key === 't') {
            createWindow();
        }
    });


const welcomeMessage = document.createElement('div');
welcomeMessage.style.position = 'fixed';
welcomeMessage.style.top = '50%';
welcomeMessage.style.left = '50%';
welcomeMessage.style.transform = 'translate(-50%, -50%)';
welcomeMessage.style.background = 'rgba(255, 255, 255, 0.9)';
welcomeMessage.style.border = '1px solid black';
welcomeMessage.style.padding = '20px';
welcomeMessage.style.fontSize = '20px';
welcomeMessage.style.zIndex = '9999';
welcomeMessage.innerHTML = '<span style="cursor: pointer; color: red;">Close</span><br>(Dℝ∃wX) Hello, thank you for choosing my script,<br>Press "t" to view the menu. Have fun! ;)';


document.body.appendChild(welcomeMessage);


welcomeMessage.querySelector('span').addEventListener('click', function() {
    document.body.removeChild(welcomeMessage);
});



document.addEventListener('keydown', function(event) {
    if (event.key === 'h') {
                const userInput = prompt("Enter the new jump height:");
        const jumpHeight = parseFloat(userInput);
        if (!isNaN(jumpHeight)) {
                Runner.instance_.tRex.setJumpVelocity(jumpHeight);
            } else {
                alert("Invalid input. Please enter a number.");
            }
        }
    });


document.addEventListener('keydown', function(event) {
    if (event.key === 'v') {

        const userInput = prompt("Choose the speed:");

        const speed = parseFloat(userInput);
        if (!isNaN(speed)) {

            Runner.instance_.setSpeed(speed);
        } else {

            alert("Invalid speed. Please enter a number.");
        }
    }
});


    document.addEventListener('keydown', function(event) {
        if (event.key === 'i') {

            Runner.prototype.gameOver = function () {};
        }
    });

    let isWalkingInTheAir = false;


document.addEventListener('keydown', function(event) {
    if (event.key === 'a') {

        if (isWalkingInTheAir) {
            Runner.instance_.tRex.groundYPos = 93;
        } else {
            Runner.instance_.tRex.groundYPos = 0;
        }

        isWalkingInTheAir = !isWalkingInTheAir;
    }
});


document.addEventListener('keydown', function(event) {
    if (event.key === 'k') {

        const userInput = prompt("Enter the new score (integer, less than 999990):");

        const newScore = parseInt(userInput, 10);
        if (!isNaN(newScore) && Number.isInteger(newScore) && newScore < 999990) {

            Runner.instance_.distanceRan = newScore / Runner.instance_.distanceMeter.config.COEFFICIENT;
        } else {

            alert("Invalid input. Please enter an integer less than 999990.");
        }
    }
});


})();