Gats.io - In-game GUI & texture packs [Read Desc.]

Texture pack mod made by Vaakir & nitrogem35

질문, 리뷰하거나, 이 스크립트를 신고하세요.
  1. // ==UserScript==
  2. // @name Gats.io - In-game GUI & texture packs [Read Desc.]
  3. // @namespace http://tampermonkey.net/
  4. // @version 2.0
  5. // @description Texture pack mod made by Vaakir & nitrogem35
  6. // @author Vaakir youtube & nitrogem35
  7. // @run-at document-end
  8. // @match https://gats.io/
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. (function() {
  13.  
  14. let overlayHTML = `
  15. <link href="https://fonts.googleapis.com/css?family=Orbitron:900" rel="stylesheet"/>
  16. <div id="box">
  17. <div class="ou" id="box2">
  18. <p>Color Mod v2</p>
  19. <label>Crate</label> <input id="acrate" type="color" value="#dfbf9f">
  20. <label>Long Crate</label> <input id="alongCrate" type="color" value="#bec8dd">
  21. <label>Crate Border</label> <input id="acrateborder" type="color" value="#808080">
  22. <label>Long Crate Border</label> <input id="alongcrateborder" type="color" value="#808080">
  23. <label>Player Crate Border</label> <input id="playercrateborder"type="color" value="#808080">
  24. <label>Random Crate Colors</label> <input id="arandom" type="checkbox" value="#0000ff">
  25. <label>Random Crate Borders</label> <input id="arandom2" type="checkbox" value="#0000ff">
  26. <label>Seizure Mode</label> <input id="seizure" type="checkbox" value="#0000ff">
  27. <label>Reset To Defaults</label> <input id="default" type="checkbox" value="#0000ff">
  28. </div>
  29. <button class="ou" id="accordian">Toggle</button>
  30. </div>
  31. <style>
  32. #box {z-index: 10;position: absolute;bottom: 10vh; left: 10px;}
  33. #box2 {
  34. display: grid;
  35. grid-template-columns: auto, auto;
  36.  
  37. padding: 5px;
  38. padding-bottom: 1vh;
  39. }
  40. .ou {
  41. background-color: #bebebe;
  42. border: 1px solid whitesmoke;
  43. box-shadow: 0px 10px 16px 0 rgba(0,0,0,1),
  44. 0 6px 20px 0 rgba(0,0,0,1);
  45. border-radius: 5px;
  46. letter-spacing: 3px;
  47.  
  48. font-weight: bold;
  49. font-family: Orbitron;
  50. color: black;
  51. }
  52. input {width: 60%;}
  53. input:hover {cursor: pointer;}
  54. input:focus {box-shadow: 0 0 10px #9ecaed;}
  55. button {margin-top: 5px;}
  56. p {grid-column: 1/3;text-align: center;}
  57. a {color: black;}
  58. #accordian {width: 15vw;border-radius: 5px;}
  59. label {grid-column: 1/2;padding: 1vh;}
  60. input {grid-column: 2/3;width: 5vw;}
  61. input[type=checkbox] {
  62. transform: scale(2);
  63. width: fit-content;
  64. margin: auto;
  65. margin-left: 5px;
  66. }
  67.  
  68. </style>
  69. `
  70. let overlay = document.createElement("div");overlay.innerHTML = overlayHTML;document.body.appendChild(overlay);
  71. function get(x){return document.getElementById(x);}
  72. let acrate=get("acrate"),alongCrate=get("alongCrate"),acrateborder=get("acrateborder"),alongcrateborder=get("alongcrateborder"),aplayercrateborder=get("playercrateborder"),ran=get("arandom"),
  73. ran2=get("arandom2"),seizure=get("seizure"),defaults=get("default");
  74. let loop = undefined;
  75. let defaultColors = ["#dfbf9f","#bec8dd","#808080"]
  76.  
  77. function rColor(){return rgbToHex(Math.floor(Math.random()*255),Math.floor(Math.random()*255),Math.floor(Math.random()*255));}
  78. function componentToHex(c) {var hex = c.toString(16);return hex.length == 1 ? "0" + hex : hex;}
  79. function rgbToHex(r, g, b) {return "#" + componentToHex(r) + componentToHex(g) + componentToHex(b);}
  80.  
  81. overlay.onfocus=function(){console.log('1')}
  82. alongCrate.onchange=function(){window.longCrate[0][1][1][3]=this.value;}
  83. acrate.onchange=function(){window.crate[0][1][1][3]=this.value;}
  84. acrateborder.onchange=function(){window.crate[0][0][1][3]=this.value;}
  85. alongcrateborder.onchange=function(){window.longCrate[0][0][1][3]=this.value;}
  86. aplayercrateborder.onchange=function(){window.userCrate[0][0][1][3]=this.value;}
  87. ran.onclick=function() {
  88. if (this.checked) {
  89. let c=rColor(), c2=rColor();
  90. window.crate[0][1][1][3]=c;acrate.value=c;
  91. window.longCrate[0][1][1][3]=c2;alongCrate.value=c2;
  92. this.checked = false;
  93. }
  94. }
  95. ran2.onclick=function() {
  96. if (this.checked) {
  97. let c=rColor(), c2=rColor(), c3=rColor();
  98. window.crate[0][0][1][3]=c;acrateborder.value=c;
  99. window.longCrate[0][0][1][3]=c2;alongcrateborder.value=c2;
  100. window.userCrate[0][0][1][3]=c3;aplayercrateborder.value=c3;
  101. this.checked = false;
  102. }
  103. }
  104. seizure.onclick=function() {
  105. if(!loop) {
  106. loop = setInterval(function(){
  107. let c=rColor(), c2=rColor();
  108. window.crate[0][1][1][3]=c;acrate.value=c;
  109. window.longCrate[0][1][1][3]=c2;alongCrate.value=c2;
  110. let e=rColor(), e2=rColor(), e3=rColor();
  111. window.crate[0][0][1][3]=e;acrateborder.value=e;
  112. window.longCrate[0][0][1][3]=e2;alongcrateborder.value=e2;
  113. window.userCrate[0][0][1][3]=e3;aplayercrateborder.value=e3;
  114. }, 100)
  115. }
  116. else {clearInterval(loop); loop=undefined;}
  117. }
  118. defaults.onclick=function() {
  119. if (this.checked) {
  120. window.crate[0][1][1][3]=defaultColors[0];acrate.value=defaultColors[0];
  121. window.crate[0][0][1][3]=defaultColors[2];acrateborder.value=defaultColors[2];
  122. window.longCrate[0][1][1][3]=defaultColors[1];alongCrate.value=defaultColors[1];
  123. window.longCrate[0][0][1][3]=defaultColors[2];alongcrateborder.value=defaultColors[2];
  124. window.userCrate[0][0][1][3]=defaultColors[2];aplayercrateborder.value=defaultColors[2];
  125. this.checked = false;
  126. }
  127. }
  128. let acc = get("accordian");
  129. acc.onclick=function(){
  130. let panel = get("box2");
  131. if (panel.style.display == "grid") panel.style.display = "none";
  132. else {panel.style.display = "grid";}
  133. }
  134. })();