// ==UserScript== // @name Prediction Toggle // @namespace http://tampermonkey.net/ // @version 1.0.0 // @description Toggles net_predict_movement // @author Altanis#6362 // @match https://diep.io/ // @grant none // @downloadURL https://update.greasyfork.icu/scripts/432909/Prediction%20Toggle.user.js // @updateURL https://update.greasyfork.icu/scripts/432909/Prediction%20Toggle.meta.js // ==/UserScript== (async function() { 'use strict'; var GUI1 = document.createElement("div"); GUI1.style = `pointer-events: none; position: fixed; top:10px; left:10px; font-family: Ubuntu; color: #FFFFFF; font-style: normal; font-size: 17px; text-shadow: black 2px 0px, black -2px 0px, black 0px -2px, black 0px 2px, black 2px 2px, black -2px 2px, black 2px -2px, black -2px -2px, black 1px 2px, black -1px 2px, black 1px -2px, black -1px -2px, black 2px 1px, black -2px 1px, black 2px -1px, black -2px -1px;`; document.body.appendChild(GUI1); GUI1.innerHTML = `

[P]: Disable Prediction

[Y]: Toggle GUI

Script by: Altanis#6362

`; const prediction = { enabled: true }; document.addEventListener('keydown', async event => { if (event.keyCode == 80 || event.which == 80) { prediction['enabled'] = !prediction['enabled']; window.input.execute('net_predict_movement ' + prediction['enabled']); if (GUI1.innerHTML == '') return; GUI1.innerHTML = `

[P]: ${prediction['enabled'] ? 'Disable' : 'Enable'} Prediction

[Y]: Toggle GUI

Script by: Altanis#1261

`; } else if (event.keyCode == 89 || event.which == 89) { if (GUI1.innerHTML == false) { GUI1.innerHTML = `

[P]: ${prediction['enabled'] ? 'Disable' : 'Enable'} Prediction

[Y]: Toggle GUI

Script by: Altanis#1261

`; } else { GUI1.innerHTML = ''; } } }); })();