Gota Script

Hotkeys, Custom Viruses + More

当前为 2016-09-24 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Gota Script
  3. // @namespace Pretty Good Gota Script
  4. // @description Hotkeys, Custom Viruses + More
  5. // @version 1
  6. // @author FFEC - Editted By Silf
  7. // @match http://gota.io/web/*
  8. // @grant GM_addStyle
  9. // ==/UserScript==
  10.  
  11. function addStyleSheet(style){
  12. var getHead = document.getElementsByTagName("HEAD")[0];
  13. var cssNode = window.document.createElement( 'style' );
  14. var elementStyle= getHead.appendChild(cssNode);
  15. elementStyle.innerHTML = style;
  16. return elementStyle;
  17. }
  18.  
  19. //Custom Font, Logo, Minimap, Viruses and Mothercells
  20. spike.src = "http://i.imgur.com/taMytTI.png";
  21. spike_mother.src = "http://i.imgur.com/1ZmrbW4.png";
  22. addStyleSheet('@import url(https://fonts.googleapis.com/css?family=Ubuntu);');
  23. GM_addStyle('* #logo {background-image: url("http://i.imgur.com/l0QnU0E.png");}');
  24. GM_addStyle('* #minimap-canvas {background-image: url("http://i.imgur.com/QMBgZaC.png");}');
  25. GM_addStyle('*{font-family: Ubuntu;}');
  26. GM_addStyle('* .coordinates {font-family: Ubuntu;}');
  27. GM_addStyle('* #leaderboard-panel {font-size: 24px;}');
  28.  
  29. var fillTextz = CanvasRenderingContext2D.prototype.fillText;
  30. CanvasRenderingContext2D.prototype.fillText = function(){
  31. var argumentz = arguments;
  32. if(this.canvas.id == 'leaderboard-canvas'){
  33. this.font = 'bold 15px Ubuntu';
  34. }
  35. if(this.canvas.id == 'minimap-canvas'){
  36. this.font = 'bold 15px Ubuntu';
  37. }
  38. if(this.canvas.id == 'party-canvas'){
  39. this.font = 'bold 15px Ubuntu';
  40. }
  41. fillTextz.apply(this, arguments);
  42. };
  43.  
  44. //Border Removal
  45. document.getElementById("leaderboard-panel").style.borderRadius = "0";
  46. document.getElementById("leaderboard-panel").style.borderWidth = "0px";
  47. document.getElementById("leaderboard-panel").style.boxShadow = "0px 0px 0px black";
  48. document.getElementById("score-panel").style.borderRadius = "0";
  49. document.getElementById("score-panel").style.borderWidth = "0px";
  50. document.getElementById("score-panel").style.boxShadow = "0px 0px 0px black";
  51. document.getElementById("minimap-panel").style.borderRadius = "0";
  52. document.getElementById("minimap-panel").style.borderWidth = "0px";
  53. document.getElementById("minimap-panel").style.boxShadow = "0px 0px 0px black";
  54. document.getElementById("minimap-panel").style.marginBottom = "3px";
  55. document.getElementById("party-panel").style.borderRadius = "0";
  56. document.getElementById("party-panel").style.borderWidth = "0px";
  57. document.getElementById("party-panel").style.boxShadow = "0px 0px 0px black";
  58.  
  59. //Custom Borders
  60. GM_addStyle('* .main-panel {border: solid 3px rgba(99, 97, 95, 0.5)}');
  61. GM_addStyle('* .main-panel {border-radius: 0px}');
  62. GM_addStyle('* .main-panel {box-shadow: 0px 0px 0px 0px rgba(0,0,0,0.52)}');
  63. GM_addStyle('* .gota-btn {border-radius: 15px}');
  64. GM_addStyle('* .main-bottom-stats {border-radius: 5px}');
  65. GM_addStyle('* #popup-party {border-radius: 0px}');
  66. GM_addStyle('* #popup-party {box-shadow: 0px 0px 0px 0px rgba(0,0,0,0.25)}');
  67. GM_addStyle('* #popup-login {border-radius: 0px}');
  68. GM_addStyle('* #popup-login {box-shadow: 0px 0px 0px 0px rgba(0,0,0,0.25)}');
  69. GM_addStyle('* .login-input {border-radius: 0px}');
  70. GM_addStyle('* #chat-input {border-radius: 0 0 0px 0px}');
  71. GM_addStyle('* .ui-pane {box-shadow: 0px 0px 0px 0px rgba(0,0,0,0.52)}');
  72.  
  73. //Miscellaneous UI Changing code
  74. GM_addStyle('* #chat-panel {width: 300px}');
  75. GM_addStyle('* #chat-panel {height: 195px}');
  76. GM_addStyle('* #chat-input {font-weight: bold}');
  77. GM_addStyle('* .stext {margin-top: 2px}');
  78. GM_addStyle('* .stext {margin-bottom: 2px}');
  79.  
  80. //Social Media Button Removal
  81. $(".main-bottom-links").replaceWith("");
  82.  
  83. //Script Version Indicator
  84. var maincontent = document.getElementById("main-content");
  85. var ffscversion = document.createElement("div");
  86. ffscversion.innerHTML = 'T - Tricksplit -|- Y - Triplesplit -|- U - Double split -|- Tab - Linesplit';
  87. ffscversion.id = 'ffecscript';
  88. maincontent.appendChild(ffscversion);
  89. document.getElementById("ffecscript").style.textAlign = "center";
  90. document.getElementById("ffecscript").style.fontSize = "12px";
  91. document.getElementById("ffecscript").style.color = "white";
  92.  
  93. //For LeaderBoard
  94. var fz = "   ᒪᗴᗩᗪᗴᖇ ᗷᗝᗩᖇᗪ";
  95.  
  96. $(".lh").replaceWith(fz);
  97.  
  98. $("#main-rb").replaceWith("");
  99. GM_addStyle ('* #main {left: 350px;}');
  100.  
  101. $("#btnforums").replaceWith("");
  102. GM_addStyle ('* #main {left: 350px;}');
  103.  
  104. //Custom Crosshair
  105. GM_addStyle ('* body {cursor: crosshair;}');
  106.  
  107. //LineSplit HotKey
  108. document.onkeydown = checkKey;
  109. function checkKey(e) {
  110. e = e || window.event;
  111. if (e.keyCode == '9') {
  112. player.mouseRawX = canvas.width / 2;
  113. player.mouseRawY = canvas.height / 2;
  114. }
  115. }
  116.  
  117. //Split Macro's
  118. (function() {
  119. var amount = 2;
  120. var duration = 5;
  121.  
  122. var overwriting = function(evt) {
  123. if (evt.keyCode === 85) {
  124. for (var i = 0; i < amount; ++i) {
  125. setTimeout(function() {
  126. window.onkeydown({keyCode: 32});
  127. window.onkeyup({keyCode: 32});
  128. }, i * duration);
  129. }
  130. }
  131. };
  132.  
  133. window.addEventListener('keydown', overwriting);
  134. })();
  135.  
  136. (function() {
  137. var amount = 3;
  138. var duration = 5;
  139.  
  140. var overwriting = function(evt) {
  141. if (evt.keyCode === 89) {
  142. for (var i = 0; i < amount; ++i) {
  143. setTimeout(function() {
  144. window.onkeydown({keyCode: 32});
  145. window.onkeyup({keyCode: 32});
  146. }, i * duration);
  147. }
  148. }
  149. };
  150.  
  151. window.addEventListener('keydown', overwriting);
  152. })();
  153.  
  154. (function() {
  155. var amount = 4;
  156. var duration = 5;
  157.  
  158. var overwriting = function(evt) {
  159. if (evt.keyCode === 84) {
  160. for (var i = 0; i < amount; ++i) {
  161. setTimeout(function() {
  162. window.onkeydown({keyCode: 32});
  163. window.onkeyup({keyCode: 32});
  164. }, i * duration);
  165. }
  166. }
  167. };
  168.  
  169. window.addEventListener('keydown', overwriting);
  170. })();
  171.  
  172. document.addEventListener('keydown', function(e) {
  173. var key = e.keyCode || e.which;
  174. switch (key) {
  175. case 70:
  176. if (options.cHideFood === true) {
  177. options.cHideFood = false;
  178. } else {
  179. options.cHideFood = true;
  180. }
  181. }
  182. });
  183. document.addEventListener('keydown', function(e) {
  184. var key = e.keyCode || e.which;
  185. switch (key) {
  186. case 83:
  187. if (options.cHideSkins === true) {
  188. options.cHideSkins = false;
  189. } else {
  190. options.cHideSkins = true;
  191. }
  192. }
  193. });
  194. document.addEventListener('keydown', function(e) {
  195. var key = e.keyCode || e.which;
  196. switch (key) {
  197. case 78:
  198. if (options.cHideNames === true) {
  199. options.cHideNames = false;
  200. } else {
  201. options.cHideNames = true;
  202. }
  203. }
  204. });
  205. //Blue Mode
  206. document.addEventListener('keydown', function(e) {
  207. var key = e.keyCode || e.which;
  208. switch (key) {
  209. case 113:
  210. if (player.rainbow === false) {
  211. player.rainbow = true;
  212. rainbowColors = ["#0000ff", "#0000ff", "#0000ff", "#0000ff", "#0000ff", "#0000ff", "#0000ff", "#0000ff", "#0000ff", "#0000ff", "#0000ff", "#0000ff", "#0000ff", "#0000ff", "#0000ff", "#0000ff", "#0000ff", "#0000ff", "#0000ff", "#0000ff", "#0000ff", "#0000ff", "#0000ff", "#0000ff", "#0000ff", "#0000ff", "#0000ff", "#0000ff", "#0000ff"];
  213. } else {
  214. player.rainbow = false;
  215. }
  216. }
  217. });