Gota Script

T - 16 Split -|- Y - Triple Split -|- U - Double Split

  1. // ==UserScript==
  2. // @name Gota Script
  3. // @namespace Pretty Good Gota Script
  4. // @description T - 16 Split -|- Y - Triple Split -|- U - Double Split
  5. // @version 10.5
  6. // @author FFEC - Editted By Silf - Edited By Tom
  7. // @match http://gota.io/web/*
  8. // @grant GM_addStyle
  9. // ==/UserScript==
  10.  
  11. // Thanks Tom Burris for removing some code that was useless!
  12. function addStyleSheet(style){
  13. var getHead = document.getElementsByTagName("HEAD")[0];
  14. var cssNode = window.document.createElement( 'style' );
  15. var elementStyle= getHead.appendChild(cssNode);
  16. elementStyle.innerHTML = style;
  17. return elementStyle;
  18. }
  19.  
  20. //Custom Font, Logo, Minimap
  21. addStyleSheet('@import url(https://fonts.googleapis.com/css?family=Ubuntu);');
  22. GM_addStyle('* #logo {background-image: url(" ");}'); // Put link between brackets
  23. GM_addStyle('* #minimap-canvas {background-image: url(" ");}'); //Put link between brackets
  24. GM_addStyle('*{font-family: Ubuntu;}');
  25. GM_addStyle('* .coordinates {font-family: Ubuntu;}');
  26. GM_addStyle('* #leaderboard-panel {font-size: 24px;}');
  27.  
  28. var fillTextz = CanvasRenderingContext2D.prototype.fillText;
  29. CanvasRenderingContext2D.prototype.fillText = function(){
  30. var argumentz = arguments;
  31. if(this.canvas.id == 'leaderboard-canvas'){
  32. this.font = 'bold 15px Ubuntu';
  33. }
  34. if(this.canvas.id == 'minimap-canvas'){
  35. this.font = 'bold 15px Ubuntu';
  36. }
  37. if(this.canvas.id == 'party-canvas'){
  38. this.font = 'bold 15px Ubuntu';
  39. }
  40. fillTextz.apply(this, arguments);
  41. };
  42.  
  43. //Border Removal
  44. document.getElementById("leaderboard-panel").style.borderRadius = "0";
  45. document.getElementById("leaderboard-panel").style.borderWidth = "0px";
  46. document.getElementById("leaderboard-panel").style.boxShadow = "0px 0px 0px black";
  47. document.getElementById("score-panel").style.borderRadius = "0";
  48. document.getElementById("score-panel").style.borderWidth = "0px";
  49. document.getElementById("score-panel").style.boxShadow = "0px 0px 0px black";
  50. document.getElementById("minimap-panel").style.borderRadius = "0";
  51. document.getElementById("minimap-panel").style.borderWidth = "0px";
  52. document.getElementById("minimap-panel").style.boxShadow = "0px 0px 0px black";
  53. document.getElementById("minimap-panel").style.marginBottom = "3px";
  54. document.getElementById("party-panel").style.borderRadius = "0";
  55. document.getElementById("party-panel").style.borderWidth = "0px";
  56. document.getElementById("party-panel").style.boxShadow = "0px 0px 0px black";
  57.  
  58. //Panel Borders
  59. GM_addStyle('* .main-panel {border: solid 3px rgba(99, 97, 95, 0.5)}');
  60. GM_addStyle('* .main-panel {border-radius: 0px}');
  61. GM_addStyle('* .main-panel {box-shadow: 0px 0px 0px 0px rgba(0,0,0,0.52)}');
  62. GM_addStyle('* .gota-btn {border-radius: 15px}');
  63. GM_addStyle('* .main-bottom-stats {border-radius: 5px}');
  64. GM_addStyle('* #popup-party {border-radius: 0px}');
  65. GM_addStyle('* #popup-party {box-shadow: 0px 0px 0px 0px rgba(0,0,0,0.25)}');
  66. GM_addStyle('* #popup-login {border-radius: 0px}');
  67. GM_addStyle('* #popup-login {box-shadow: 0px 0px 0px 0px rgba(0,0,0,0.25)}');
  68. GM_addStyle('* .login-input {border-radius: 0px}');
  69. GM_addStyle('* #chat-input {border-radius: 0 0 0px 0px}');
  70. GM_addStyle('* .ui-pane {box-shadow: 0px 0px 0px 0px rgba(0,0,0,0.52)}');
  71. GM_addStyle('* #main-cover {display: none}');
  72.  
  73. //Chat Size
  74. GM_addStyle('* #chat-panel {width: 300px}');
  75. GM_addStyle('* #chat-panel {height: 195px}');
  76.  
  77. //Social Media Buttons Removal
  78. $(".main-bottom-links").replaceWith("");
  79.  
  80. //Instructions
  81. var maincontent = document.getElementById("main-content");
  82. var version = document.createElement("div");
  83. version.innerHTML = 'T - Tricksplit -|- Y - Triplesplit -|- U - Double split';
  84. version.id = 'instructions';
  85. maincontent.appendChild(version);
  86. document.getElementById("instructions").style.textAlign = "center";
  87. document.getElementById("instructions").style.fontSize = "12px";
  88. document.getElementById("instructions").style.color = "white";
  89.  
  90. //Ad Remove
  91. $("#main-rb").replaceWith("");
  92. GM_addStyle ('* #main {left: 350px;}');
  93.  
  94. //Custom Cursor
  95. GM_addStyle ('* body {cursor: crosshair;}');
  96.  
  97. function split() {
  98. window.onkeydown({keyCode: 32});
  99. window.onkeyup({keyCode: 32});
  100. }
  101.  
  102. window.addEventListener('keydown', keydown);
  103. //window.addEventListener('keyup', keyup); //This isn't used
  104. var timeBetweenSplits = 10; //This is the number of milliseconds between splits for the macros
  105.  
  106. function keydown(event) {
  107. if (event.keyCode == 85) { //key U
  108. split(); //Double Split
  109. setTimeout(split, timeBetweenSplits*1);
  110. } else if (event.keyCode == 89) { //key Y
  111. split(); //Triple Split
  112. setTimeout(split, timeBetweenSplits*1);
  113. setTimeout(split, timeBetweenSplits*2);
  114. } else if (event.keyCode === 84) { //key T
  115. split(); //16 Split Macro
  116. setTimeout(split, timeBetweenSplits*1);
  117. setTimeout(split, timeBetweenSplits*2);
  118. setTimeout(split, timeBetweenSplits*3);
  119. } else if (event.keyCode == 80) { //key P
  120. $("canvas").trigger($.Event("mousemove", {clientX: window.innerWidth/2, clientY: window.innerHeight/2})); //Stop Cell
  121. } else if (event.keyCode == 67) { //key C
  122. document.getElementById("cHideChat").click(); //Hide Chat (Delete this line if you don't want it)
  123. } else if (event.keyCode == 70) { //key F
  124. document.getElementById("cHideFood").click(); //Hide Pellets (Delete this line if you don't want it)
  125. } else if (event.keyCode == 83) { //key S
  126. document.getElementById("cHideSkins").click(); //Hide Skins (Delete this line if you don't want it)
  127. }
  128. }
  129. //Remove some of the code sections if you dislike them