Guest User

Diep Scripts

a guest
Mar 17th, 2025
1,136
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.95 KB | None | 0 0
  1. 1) Aimbot
  2. This is the one script I don't want to give away, because it'd make the game unfair. That said, here's the function i use to predict movement, for informational purposes:
  3. function intercept(src, dst, v) {
  4. var tx = dst.x - src.x,
  5. ty = dst.y - src.y,
  6. tvx = dst.vx,
  7. tvy = dst.vy;
  8.  
  9. // Get quadratic equation components
  10. var a = tvx * tvx + tvy * tvy - v * v;
  11. var b = 2 * (tvx * tx + tvy * ty);
  12. var c = tx * tx + ty * ty;
  13.  
  14. // Solve quadratic
  15. var ts = quad(a, b, c); // See quad(), below
  16.  
  17. // Find smallest positive solution
  18. var sol = null;
  19. if (ts) {
  20. var t0 = ts[0],
  21. t1 = ts[1];
  22. var t = Math.min(t0, t1);
  23. if (t < 0) t = Math.max(t0, t1);
  24. if (t > 0) {
  25. sol = {
  26. x: dst.x + dst.vx * t,
  27. y: dst.y + dst.vy * t
  28. };
  29. }
  30. }
  31.  
  32. return sol;
  33. }
  34. function quad(a, b, c) {
  35. var sol = null;
  36. if (Math.abs(a) < 1e-6) {
  37. if (Math.abs(b) < 1e-6) {
  38. sol = Math.abs(c) < 1e-6 ? [0, 0] : null;
  39. } else {
  40. sol = [-c / b, -c / b];
  41. }
  42. } else {
  43. var disc = b * b - 4 * a * c;
  44. if (disc >= 0) {
  45. disc = Math.sqrt(disc);
  46. a = 2 * a;
  47. sol = [(-b - disc) / a, (-b + disc) / a];
  48. }
  49. }
  50. return sol;
  51. }
  52.  
  53. Use the above like:
  54.  
  55. let t = intercept({
  56. x: mainCircle.x,
  57. y: mainCircle.y
  58. }, {
  59. x: target.x,
  60. y: target.y,
  61. vx: avgXV - myXV,
  62. vy: avgYV - myYV
  63. }, bulletSpeed);
  64. t will have the x and y you should aim at (use Math.atan2)
  65. ---------------------------------------------------------------------------
  66. 2) Visual mods
  67. These are the elegant one-liners! There's two categories, globalCompositeOperation and filter.
  68. To run code, all you have to do is press f12 or ctrl + shift + i on diep.io to open a developer console. Then, in the space, type the code, hit enter, and you should see the screen change.
  69. a) GCO
  70. canvas.getContext('2d').globalCompositeOperation = <filter>
  71. where <filter> is one of the following: 'lighter', 'xor', 'multiply', 'overlay', 'darken', 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', or 'luminosity' (with the single quotes but not the commas)
  72.  
  73. b) filter
  74. Just type one of the following:
  75. canvas.style.filter = 'sepia(100%)';
  76. canvas.style.filter = 'hue-rotate(100deg)';
  77.  
  78. or my personal favorite, rainbow:
  79. setInterval(() => {
  80. canvas.style.filter = ''
  81. }, 1000 / 60)
  82.  
  83. 3) 3D mods
  84. True 3D script (broken): https://greasyfork.org/en/scripts/432833-diep-io-3d/code
  85. Fake 3D script shown in the video:
  86. var shaderButton = document.createElement('button');
  87. document.getElementsByTagName('body')[0].appendChild(shaderButton);
  88. shaderButton.style = "position:absolute; top:10px; left:10px; z-index:10000;";
  89. shaderButton.innerHTML = "Turn on the shader or something lol";
  90. shaderButton.onclick = function() {
  91. input.set_convar('ren_background', false);
  92. document.getElementById('backdrop-asset').style.opacity = 0;
  93. shaderButton.style.display = 'none';
  94. }
  95.  
  96. var c2 = document.createElement('canvas');
  97. c2.style = "position:absolute;top:0px;left:0px;width:100%;height:100%;z-index:-1;";
  98. document.getElementsByTagName('body')[0].appendChild(c2);
  99. var ctx2 = c2.getContext('2d');
  100.  
  101. var c = document.getElementById('canvas');
  102. var ctx = c.getContext('2d');
  103. c.style.opacity = 0;
  104.  
  105. var i = 0;
  106.  
  107. var depth = 6;
  108.  
  109. c2.width = c.width;
  110. c2.height = c.height;
  111.  
  112. window.addEventListener('resize', function() {
  113. c2.width = c.width;
  114. c2.height = c.height;
  115. }, false);
  116.  
  117. function loop() {
  118. ctx2.clearRect(0, 0, c2.width, c2.height);
  119. ctx2.drawImage(c, Math.pow(2, depth - 2), Math.pow(2, depth - 2), c2.width - Math.pow(2, depth - 1), c2.height - Math.pow(2, depth - 1));
  120. for (i = 0; depth > i; i++) {
  121. ctx2.drawImage(c2, -Math.pow(2, i), -Math.pow(2, i), c2.width + Math.pow(2, i + 1), c2.height + Math.pow(2, i + 1));
  122. }
  123. requestAnimationFrame(loop);
  124. }
  125. loop();
  126. ---------------------------------------------------------------------------
  127. 4) My own version of diep!
  128. https://tmzg.onrender.com (hosted on render.com, a free hosting platform)
Advertisement
Comments
Add Comment
Please, Sign In to add comment