Skip to content

Latest commit

 

History

History
9 lines (8 loc) · 2.64 KB

dino_hack-js.md

File metadata and controls

9 lines (8 loc) · 2.64 KB
title date categories
Dino_hack.Js
2023-11-23
useful-script-en

how to add bookmarklet in chrome
export default { icon: "https://chromedino.com/favicon.ico", name: { en: "Enable/Disable Hack T-Rex Dino Game", vi: "Enable/Disable Hack T-Rex Dino Game", }, description: { en: "A bot that plays the Google Chrome T-Rex game for you", en: "Auto play Google Chrome T-Rex game", }, onClick: function() { / / https://github.com/danpush/t-rex-game-bot function hack() { / /prettier-ignore function keyDown(e){Podium={}; var n=document.createEvent("KeyboardEvent"); Object.defineProperty(n,"keyCode",{get:function(){return this.keyCodeVal}}),n.initKeyboardEvent?n.initKeyboardEvent("keydown",!0,!0,1,document.defaultView,e,"","",!0,"):n.initKeyEvent("keydown",!0,!1,document.defaultView,!1,!1,!1,!0,e,0),n.keyCodeVal=e,document.body.dispatchEvent(n)} / /prettier-ignore function keyUp(e){Podium={}; var n=document.createEvent("KeyboardEvent"); Object.defineProperty(n,"keyCode",{get:function(){return this.keyCodeVal}}),n.initKeyboardEvent?n.initKeyboardEvent("keyup",!0,!1,document.defaultView,e,"","",!0,"):n.initKeyEvent("keyup",!0,!1,document.defaultView,!1,!1,!1,!0,e,<>),n.keyCodeVal=e,document.body.dispatchEvent(n)} let timeoutId = setInterval(function() { Runner.instance_.horizon.obstacles.length > 0 &&& ; ( Runner.instance_.horizon.obstacles[0].xPos < 20*Runner.instance_.currentSpeed - Runner.instance_.horizon.obstacles[0].width / 2 && Runner.instance_.horizon.obstacles[0].yPos > 75 &&; (keyUp(40), keyDown (38)), Runner.instance_.horizon.obstacles[0].xPos < 20*Runner.instance_.currentSpeed - Runner.instance_.horizon.obstacles[0].width / 2 && Runner.instance_.horizon.obstacles[0].yPos <= 75 && keyDown(40)); }, 5); return () => { clearInterval(timeoutId); }; } if (window. Runner) { if (window.ufsDisableHackDino) { window.ufsDisableHackDino?. (); alert("DINO game hacking TURNED OFF."); } else { window.ufsDisableHackDino = hack(); alert("HACK game dino enabled."); } } else { let urls = [ "https://chromedino.com/", "https://elgoog.im/t-rex/?bot", "https://offline-dino-game.firebaseapp.com/", "https://fivesjs.skipser.com/trex-game/", ]; let selected = prompt( "Game not found. Run the game and turn the hack back on." + "\n\nOr select 1 of the following sites to play:\n " + urls.map((_, i) => ' ${i}: ${_}').join("\n") ); if (selected == null) return; window.open(urls[selected]); } }, }; export const shared = {};