Paper.IO Skins & Zoom Hack

Get all skins and ability to zoom in paper.io

  1. // ==UserScript==
  2. // @name Paper.IO Skins & Zoom Hack
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.2
  5. // @description Get all skins and ability to zoom in paper.io
  6. // @author Zertalious (Zert)
  7. // @match *://paper-io.com/*
  8. // @icon https://www.google.com/s2/favicons?sz=64&domain=paper.io
  9. // @grant none
  10. // @antifeature ads
  11. // @run-at document-start
  12. // ==/UserScript==
  13.  
  14. Object.defineProperty( window, 'shop', {
  15. get() {
  16.  
  17. return this._shop;
  18.  
  19. },
  20. set( shop ) {
  21.  
  22. console.log( 'SHOP!!', shop );
  23.  
  24. Object.defineProperty( shop, 'btnsData', {
  25. set( btnsData ) {
  26.  
  27. for ( let i = 0; i < btnsData.length; i ++ ) {
  28.  
  29. Object.defineProperty( btnsData[ i ], 'status', {
  30. get() {
  31.  
  32. if ( this._status === 'locked' ) {
  33.  
  34. return 'open';
  35.  
  36. }
  37.  
  38. return this._status;
  39.  
  40. },
  41. set( value ) {
  42.  
  43. this._status = value;
  44.  
  45. }
  46. } );
  47.  
  48. }
  49.  
  50. console.log( 'btnsData!!!', btnsData );
  51.  
  52. this._btnsData = btnsData;
  53.  
  54. },
  55. get() {
  56.  
  57. return this._btnsData;
  58.  
  59. }
  60. } )
  61.  
  62. this._shop = shop;
  63.  
  64. }
  65. } );
  66.  
  67. Object.defineProperty( window, 'checkShouldUnlockSkin', {
  68. get() {
  69.  
  70. return function () { return true; }
  71.  
  72. }
  73. } );
  74.  
  75. let scale = 1;
  76.  
  77. window.addEventListener( 'DOMContentLoaded', function () {
  78.  
  79. const value = parseInt( new URLSearchParams( window.location.search ).get( 'showAd' ), 16 );
  80.  
  81. const shouldShowAd = isNaN( value ) || Date.now() - value < 0 || Date.now() - value > 10 * 60 * 1000;
  82.  
  83. const el = document.createElement( 'div' );
  84.  
  85. el.innerHTML = `<style>
  86.  
  87. .dialog {
  88. position: absolute;
  89. left: 50%;
  90. top: 50%;
  91. padding: 20px;
  92. background: rgba(0, 0, 0, 0.8);
  93. border: 6px solid rgba(0, 0, 0, 0.2);
  94. color: #fff;
  95. transform: translate(-50%, -50%);
  96. text-align: center;
  97. z-index: 999999;
  98. }
  99.  
  100. .dialog * {
  101. color: #fff;
  102. }
  103.  
  104. .dialog-close {
  105. position: absolute;
  106. right: 5px;
  107. top: 5px;
  108. width: 20px;
  109. height: 20px;
  110. opacity: 0.5;
  111. cursor: pointer;
  112. }
  113.  
  114. .dialog-close:before, .dialog-close:after {
  115. content: ' ';
  116. position: absolute;
  117. left: 50%;
  118. top: 50%;
  119. width: 100%;
  120. height: 20%;
  121. transform: translate(-50%, -50%) rotate(-45deg);
  122. background: #fff;
  123. }
  124.  
  125. .dialog-close:after {
  126. transform: translate(-50%, -50%) rotate(45deg);
  127. }
  128.  
  129. .dialog-close:hover {
  130. opacity: 1;
  131. }
  132.  
  133. .btn {
  134. cursor: pointer;
  135. padding: 0.4em;
  136. background: red;
  137. border-bottom: 5px solid rgba(0, 0, 0, 0.2);
  138. }
  139.  
  140. .btn:active {
  141. transform: scale(0.8);
  142. }
  143.  
  144. </style>
  145. <div class="dialog">${shouldShowAd ? `<big>Loading ad...</big>` : `<div class="dialog-close" onclick="this.parentNode.style.display='none';"></div>
  146. <big>Skins & Zoom Cheat</big>
  147. <br>
  148. Use the shop to equip any skin you like.
  149. <br>
  150. Scroll to zoom.
  151. <br>
  152. <br>
  153. By Zertalious
  154. <br>
  155. <br>
  156. <div style="display: grid; grid-template-columns: 1fr 1fr; grid-gap: 5px;">
  157. <div class="btn" onclick="window.open('https://discord.gg/K24Zxy88VM', '_blank')">Discord</div>
  158. <div class="btn" onclick="window.open('https://www.instagram.com/zertalious/', '_blank')">Instagram</div>
  159. <div class="btn" onclick="window.open('https://twitter.com/Zertalious', '_blank')">Twitter</div>
  160. <div class="btn" onclick="window.open('https://greatest.deepsurf.us/en/users/662330-zertalious', '_blank')">More scripts</div>
  161. </div>
  162. ` }
  163. </div>`;
  164.  
  165. while ( el.children.length > 0 ) {
  166.  
  167. document.body.appendChild( el.children[ 0 ] );
  168.  
  169. }
  170.  
  171. if ( shouldShowAd ) {
  172.  
  173. const url = new URL( window.location.href );
  174.  
  175. url.searchParams.set( 'showAd', Date.now().toString( 16 ) );
  176. url.searchParams.set( 'scriptVersion', GM.info.script.version );
  177.  
  178. window.location.href = 'https://zertalious.xyz?ref=' + new TextEncoder().encode( url.href ).toString();
  179.  
  180. }
  181.  
  182. const zoomEl = document.getElementById( 'the_game' );
  183. zoomEl.style.transformOrigin = '0 0';
  184.  
  185. document.addEventListener( 'wheel', function ( event ) {
  186.  
  187. scale *= event.deltaY > 0 ? 0.9 : 1.1;
  188.  
  189. zoomEl.style.transform = 'scale(' + scale + ')';
  190.  
  191. zoomEl.style.width = window.innerWidth / scale + 'px';
  192. zoomEl.style.height = window.innerHeight / scale + 'px';
  193.  
  194. } );
  195.  
  196. } );
  197.  
  198. CanvasRenderingContext2D.prototype.clearRect = new Proxy( CanvasRenderingContext2D.prototype.clearRect, {
  199. apply( target, thisArgs, args ) {
  200.  
  201. Reflect.apply( ...arguments );
  202.  
  203. if ( args[ 2 ] === window.innerWidth && args[ 3 ] === window.innerHeight ) {
  204.  
  205. thisArgs.restore();
  206.  
  207. thisArgs.save();
  208.  
  209. const f = ( 0.5 - scale * 0.5 );
  210.  
  211. thisArgs.translate( window.innerWidth * f, window.innerHeight * f );
  212.  
  213. thisArgs.scale( scale, scale );
  214.  
  215. }
  216.  
  217. }
  218. } );