Gats.io - Vaakir's hack pack GUI

Hacks, and color mod v1 by Vaakir with the colod mod v2 from nitrogem35

  1. //******************************************************** GATS:IO SCRIPT ********************************************************************/
  2. // ==UserScript==
  3. // @name Gats.io - Vaakir's hack pack GUI
  4. // @namespace http://tampermonkey.net/
  5. // @version 3.0
  6. // @description Hacks, and color mod v1 by Vaakir with the colod mod v2 from nitrogem35
  7. // @author Vaakir youtube & nitrogem35
  8. // @run-at document-end
  9. // @match https://gats.io/
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. // COMMENT : I got bored, okay? So I just made a GUI for some of the scripts, hope y'all like it, I'm satisfied :>
  14. // GATS DEVELOPER : (translate) Ich werde wahrscheinlich diese .io-Spiele verlassen, das Ändern der Funktion [Namen] reicht aus, um dieses Skript zu patchen. Bis das passiert, trololol :joy:
  15. // GATS DEVELOPER : Im probably leaving gonna these .io games, changing the function [names] is enough to patch this script. Untill that happens, trololol :joy:
  16.  
  17. (function() {
  18.  
  19. let overlayHTML = `
  20. <link href="https://fonts.googleapis.com/css?family=Orbitron:900" rel="stylesheet"/>
  21. <div id="box">
  22. <div class="ou" id="box2">
  23. <p style="color:white;">⚡ Gats.io Full Hack pack ⚡</p>
  24. <p id="ytlink"><a href="https://www.youtube.com/channel/UC2m-9cAoT8EEO2dqWlk4Yfw" target="_blank">Vaakir Youtube</a></p>
  25. <section><label>Aimbot [Right click]</label> <input id="aimbot" type="checkbox" value="#0000ff"></section>
  26. <section><label>Zoom [mousewheel] </label><div class="checked"></div></section>
  27. <section><label>Mine detection </label><div class="checked"></div></section>
  28. <section><label>Ghost detection </label><div class="checked"></div></section>
  29. <section><label>Silencer detection </label><div class="checked"></div></section>
  30.  
  31. <section><label>Crate</label> <input id="acrate" type="color" value="#dfbf9f"></section>
  32. <section><label>Long Crate</label> <input id="alongCrate" type="color" value="#bec8dd"></section>
  33. <section><label>Crate Border</label> <input id="acrateborder" type="color" value="#808080"></section>
  34. <section><label>Long Crate Border</label> <input id="alongcrateborder" type="color" value="#808080"></section>
  35. <section><label>Player Crate Border</label> <input id="playercrateborder" type="color" value="#808080"></section>
  36. <section><label>Random Crate Colors</label> <input id="arandom" type="checkbox" value="#0000ff"></section>
  37. <section><label>Random Crate Borders</label> <input id="arandom2" type="checkbox" value="#0000ff"></section>
  38. <section><label>Seizure Mode</label> <input id="seizure" type="checkbox" value="#0000ff"></section>
  39. <section><label>Vaakir Mode</label> <input id="vaakirmode" type="checkbox" value="#0000ff"></section>
  40. <section><label>Reset To Defaults</label> <input id="default" type="checkbox" value="#0000ff"></section>
  41. <section><label>Multiboxing </label><div class="checked notchecked"></div></section>
  42. <section><label>Auto upgrading </label><div class="checked notchecked"></div></section>
  43. <section><label>Scrolling text </label><div class="checked notchecked"></div></section>
  44. </div>
  45. <button class="ou" id="accordian">Toggle</button>
  46. </div>
  47. <style>
  48. #box {
  49. z-index: 10;
  50. position: absolute;
  51. bottom: 10vh;
  52. left: 10px;}
  53. #box2 {
  54. padding: 15px;
  55. margin-bottom: 5px}
  56. section {
  57. display: flex;
  58. justify-content: space-between;margin:5px;}
  59. .ou {
  60. background-color: rgba(85,85,85,0.5);
  61. letter-spacing: 3px;
  62.  
  63. font-weight: bold;
  64. font-size: 15px;
  65. font-family: Orbitron;
  66. color:white;}
  67. p { text-align: center;border-bottom:1px solid white;}
  68. #ytlink { border:0;}
  69. #ytlink a{ color:lime;}
  70. #accordian {
  71. width: 100%;
  72. border:0;}
  73. label { font-weight: bold;}
  74. input {
  75. margin-top: auto;
  76. margin-bottom: auto;
  77. transform: scale(1.3);}
  78. input:hover { cursor: pointer;}
  79. input:focus { box-shadow: 0 0 10px #9ecaed;}
  80. input[type=checkbox] { transform: scale(2.2);outline=none;}
  81. input[type=radio] { border-top: auto;}
  82. input[type=color] { width: 50px;}
  83. .checked {
  84. height: 20px;
  85. width: 20px;
  86. box-shadow: -1px -2px 5px gray;
  87. border: 3px solid gray;
  88. background-color: green;
  89. margin-top: auto;
  90. margin-bottom: auto;
  91. box-shadow: 2 2 2px #a0a0a0;
  92. width:20px;
  93. transform: scale(1.5);}
  94. .notchecked { background-color: red;}
  95. </style>
  96. `
  97.  
  98. // Usefull functions..
  99. function get(x) { return document.getElementById(x); }
  100. function rColor() { return rgbToHex(Math.floor(Math.random()*255),Math.floor(Math.random()*255),Math.floor(Math.random()*255)); }
  101. function componentToHex(c) { var hex = c.toString(16);return hex.length == 1 ? "0" + hex : hex; }
  102. function rgbToHex(r, g, b) { return "#" + componentToHex(r) + componentToHex(g) + componentToHex(b); }
  103.  
  104. // Setting up the html div
  105. let overlay = document.createElement("div");
  106. overlay.innerHTML = overlayHTML;
  107. document.body.appendChild(overlay);
  108.  
  109. // Getting variables from div by id's
  110. let acrate = get("acrate"),
  111. alongCrate = get("alongCrate"),
  112. acrateborder = get("acrateborder"),
  113. alongcrateborder = get("alongcrateborder"),
  114. aplayercrateborder = get("playercrateborder"),
  115. ran = get("arandom"),
  116. ran2 = get("arandom2"),
  117. seizure = get("seizure"),
  118. defaults = get("default"),
  119. acc = get("accordian"),
  120. vaakirmod = get("vaakirmode"),
  121. aimbot = get("aimbot");
  122.  
  123. let loop = undefined;
  124. let defaultColors = ["#dfbf9f","#bec8dd","#808080"];
  125. let zoom = 1;
  126. let initAimbot = false;
  127.  
  128. // Color picker on change
  129. alongCrate.onchange = function() { window.longCrate[0][1][1][3] = this.value; }
  130. acrate.onchange = function() { window.crate[0][1][1][3] = this.value; }
  131. acrateborder.onchange = function() { window.crate[0][0][1][3] = this.value; }
  132. alongcrateborder.onchange = function() { window.longCrate[0][0][1][3] = this.value; }
  133. aplayercrateborder.onchange = function() { window.userCrate[0][0][1][3] = this.value; }
  134. ran.onclick = function() {
  135. if (this.checked) {
  136. let c=rColor(), c2=rColor();
  137. window.crate[0][1][1][3]=c; acrate.value=c;
  138. window.longCrate[0][1][1][3]=c2;alongCrate.value=c2;
  139. this.checked = false;
  140. }
  141. }
  142. ran2.onclick = function() {
  143. if (this.checked) {
  144. let c=rColor(), c2=rColor(), c3=rColor();
  145. window.crate[0][0][1][3]=c;acrateborder.value=c;
  146. window.longCrate[0][0][1][3]=c2;alongcrateborder.value=c2;
  147. window.userCrate[0][0][1][3]=c3;aplayercrateborder.value=c3;
  148. this.checked = false;
  149. }
  150. }
  151. seizure.onclick = function() {
  152. if(!loop) {
  153. loop = setInterval(function(){
  154. let c=rColor(), c2=rColor();
  155. window.crate[0][1][1][3] =c;acrate.value=c;
  156. window.longCrate[0][1][1][3]=c2;alongCrate.value=c2;
  157. let e=rColor(), e2=rColor(), e3=rColor();
  158. window.crate[0][0][1][3]=e;acrateborder.value=e;
  159. window.longCrate[0][0][1][3]=e2;alongcrateborder.value=e2;
  160. window.userCrate[0][0][1][3]=e3;aplayercrateborder.value=e3;
  161. }, 100)
  162. }
  163. else { clearInterval(loop); loop=undefined; }
  164. }
  165. defaults.onclick = function() {
  166. if (this.checked) {
  167. window.crate[0][1][1][3] = defaultColors[0]; acrate.value = defaultColors[0];
  168. window.crate[0][0][1][3] = defaultColors[2]; acrateborder.value = defaultColors[2];
  169. window.longCrate[0][1][1][3] = defaultColors[1]; alongCrate.value = defaultColors[1];
  170. window.longCrate[0][0][1][3] = defaultColors[2]; alongcrateborder.value = defaultColors[2];
  171. window.userCrate[0][0][1][3] = defaultColors[2]; aplayercrateborder.value = defaultColors[2];
  172. this.checked = false;
  173. }
  174. }
  175. vaakirmod.onclick = function() {
  176. window.crate[0][0][1][3] = "#4dd8f0"; acrate.value = "#4dd8f0";
  177. window.crate[0][1][1][3] = "#b1e9f9"; acrateborder.value = "#b1e9f9";
  178. window.longCrate[0][0][1][3] = "#303030"; alongCrate.value = "#303030";
  179. window.longCrate[0][1][1][3] = "#646464"; alongcrateborder.value = "#646464";
  180. this.checked = false;
  181. }
  182.  
  183. // Toggle functionality
  184. acc.onclick = function() {
  185. let panel = get("box2");
  186. if (panel.style.display == "grid") panel.style.display = "none";
  187. else { panel.style.display = "grid"; }
  188. }
  189.  
  190. // Zoom hack on mousewheel scrolling
  191. window.addEventListener("wheel", function(e) {
  192. let dir = Math.sign(e.deltaY);
  193. if (dir== 1) {j7*=1.1;j8*=1.1;a1();zoom*=1.1;}
  194. if (dir==-1) {j7*=0.95;j8*=0.95;a1();zoom*=0.95;}
  195. });
  196.  
  197. // The script just commits suicide without a timeout apparantly. Bc of (0) data
  198. setTimeout(function(){
  199. // Shows landmines
  200. landMine[0].forEach((a,i)=>{landMine[0][i][1][3]="#000000"});
  201.  
  202. // Shows camos
  203. setInterval(()=>{Object.keys(RD.pool).forEach((a,i)=>{
  204. if(RD.pool[i].ghillie){RD.pool[i].ghillie=0;RD.pool[i].invincible=1}
  205. })},30);
  206.  
  207. // Shows silencers
  208. setInterval(()=>{Object.keys(RC.pool).forEach((a,i)=>{
  209. if(RC.pool[i].silenced){RC.pool[i].silenced=0}
  210. })},30);
  211. }, 3000);
  212.  
  213. // Aimbot w/tracers [I know, I know, the code could be prettified, but fuck that, lemme just publish it as it is, I have other projects calling..]
  214. let hw = document.getElementById("canvas");
  215. let can1 = document.createElement("canvas");
  216. can1.id = "c1"; can1.width = 1224; can1.height = 768;
  217. can1.style.zIndex = 1; can1.style.position = "absolute";
  218. document.getElementsByTagName("body")[0].appendChild(can1);
  219. let myctx = can1.getContext("2d");
  220.  
  221. aimbot.onclick = function() {
  222. if (this.checked == false) myctx.clearRect(0, 0, can1.width, can1.height);
  223. }
  224. // Right click to switch aimbot on/off
  225. document.addEventListener('contextmenu', function(e) {
  226. if (e.which == 3) {
  227. if (aimbot.checked) {
  228. aimbot.checked=false;
  229. myctx.clearRect(0, 0, can1.width, can1.height);
  230. } else aimbot.checked = true;
  231. }
  232. });
  233.  
  234. // Im fully aware I could optimize and shorten this down 2 times
  235. setInterval(function(){
  236. if (aimbot.checked) {
  237. can1.width = hw.width;
  238. can1.height = hw.height;
  239. let enemies = [];
  240. let me = RD.pool[c3];
  241. for(let player of Object.values(RD.pool)) {
  242. if(!player.activated) continue
  243. if(player.id == me.id) continue
  244. if(player.teamCode) if(player.teamCode == me.teamCode) continue
  245. if(player.hp == 0) continue
  246. enemies.push(player)
  247. }
  248.  
  249. let diX;
  250. let diY;
  251. let num = 0;
  252. let dis = 10000;
  253. for (let i = 0;i<enemies.length;i++) {
  254. let ndis = Math.sqrt( (enemies[i].x-RD.pool[c3].x)**2 + (enemies[i].y-RD.pool[c3].y)**2 );
  255. if (ndis < dis) {
  256. dis = ndis;
  257. num = i;
  258. }
  259. }
  260. dis /= 35;
  261.  
  262. let playerScreenPos = c2.getRelPos(RD.pool[c3]);
  263. playerScreenPos.x *= j5;
  264. playerScreenPos.y *= j5;
  265. let angle = RD.pool[c3].mouseAngle*(Math.PI / 180);
  266. let playerGunPos = {
  267. x: playerScreenPos.x+Math.cos(angle-Math.PI/18)*(80*j5),
  268. y: playerScreenPos.y+Math.sin(angle-Math.PI/18)*(80*j6)
  269. };
  270.  
  271. if (enemies.length >= 1) {
  272. diX = (enemies[num].x-RD.pool[c3].x)+playerScreenPos.x;
  273. diY = (enemies[num].y-RD.pool[c3].y)+playerScreenPos.y;
  274. let newY, newX, me=RD.pool[c3];
  275.  
  276. // Not necessary but, yk, I found it pretty usefull
  277. if (enemies[num].dashing == 0) {
  278. newX = diX+enemies[num].spdX*dis;
  279. newY = diY+enemies[num].spdY*dis;
  280. } else {
  281. newX = diX;
  282. newY = diY;
  283. }
  284. if (aimbot.checked) {a57({clientX:newX,clientY:newY});}
  285. }
  286.  
  287. myctx.strokeStyle = "red";
  288. myctx.lineWidth = 3;
  289. for (let i=0;i<enemies.length;i++) {
  290. dis = Math.sqrt( (enemies[i].x-RD.pool[c3].x)**2 + (enemies[i].y-RD.pool[c3].y)**2 )/35;
  291. diX = (enemies[i].x-RD.pool[c3].x)+playerScreenPos.x+enemies[i].spdX*dis;
  292. diY = (enemies[i].y-RD.pool[c3].y)+playerScreenPos.y+enemies[i].spdY*dis
  293.  
  294. myctx.moveTo(playerGunPos.x,playerGunPos.y);
  295. myctx.lineTo(diX,diY);
  296. myctx.stroke();
  297. }
  298. }
  299. });
  300. })();