DigDig.IO Temporary Account

Creates a temporary account whenever you join the game. Good for using cheats and not get banned.

  1. // ==UserScript==
  2. // @name DigDig.IO Temporary Account
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.0.6
  5. // @description Creates a temporary account whenever you join the game. Good for using cheats and not get banned.
  6. // @author Zertalious (Zert)
  7. // @match *://digdig.io/*
  8. // @icon https://www.google.com/s2/favicons?domain=digdig.io
  9. // @run-at document-start
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. const style = document.createElement( 'style' );
  14.  
  15. style.textContent = `
  16.  
  17. span {
  18. position: absolute;
  19. bottom: 10px;
  20. left: 50%;
  21. transform: translate(-50%, 0);
  22. color: #fff;
  23. font-family: Ubuntu;
  24. z-index: 999;
  25. cursor: pointer;
  26. padding: 4px 8px;
  27. text-shadow: 1px 0 #000, -1px 0 #000, 0 1px #000, 0 -1px #000, 1px 1px #000, -1px -1px #000;
  28. }
  29.  
  30. span:active {
  31. background: rgba(0, 0, 0, 0.25);
  32. }
  33.  
  34. `;
  35.  
  36.  
  37. const span = document.createElement( 'span' );
  38.  
  39. span.style.display = 'none';
  40.  
  41. span.textContent = 'waiting for account...';
  42.  
  43. span.onclick = function () {
  44.  
  45. navigator.clipboard.writeText( span.textContent );
  46.  
  47. }
  48.  
  49. window.addEventListener( 'DOMContentLoaded', function () {
  50.  
  51. document.body.appendChild( style );
  52.  
  53. document.body.appendChild( span );
  54.  
  55. }, false );
  56.  
  57. window.addEventListener( 'keyup', function ( event ) {
  58.  
  59. if ( String.fromCharCode( event.keyCode ) === 'Z' ) {
  60.  
  61. span.style.display = span.style.display === '' ? 'none' : '';
  62.  
  63. }
  64.  
  65. } );
  66.  
  67. Object.defineProperty( window, 'localStorage', {
  68. value: new Proxy( window.localStorage, {
  69. get( target, prop, receiver ) {
  70.  
  71. if ( prop === 'cp6_player_id' ) {
  72.  
  73. return '';
  74.  
  75. }
  76.  
  77. return Reflect.get( ...arguments );
  78.  
  79. },
  80. set( target, prop, value, receiver ) {
  81.  
  82. if ( prop === 'cp6_player_id' ) {
  83.  
  84. span.textContent = value;
  85.  
  86. return;
  87.  
  88. }
  89.  
  90. return Reflect.set( ...arguments );
  91.  
  92. }
  93. } )
  94. } );