Freebie.io

Gota.io script

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

  1. // ==UserScript==
  2. // @name Freebie.io
  3. // @namespace YOLO
  4. // @version 1.2
  5. // @description Gota.io script
  6. // @author freebie
  7. // @match http://gota.io/web/*
  8. // @grant GM_addStyle
  9. // @contributor pussi
  10. // ==/UserScript==
  11. spike.src = "http://i.imgur.com/D7q2cID.png";
  12. spike_mother.src = "http://i.imgur.com/qCQ0I9S.png";
  13. GM_addStyle('* #logo {background-image: url("http://i.imgur.com/tLa14uz.png");}');
  14. addStyleSheet('@import url(https://fonts.googleapis.com/css?family=Ubuntu);');
  15. GM_addStyle('* @font-face {font-family: "Ubuntu"; src: url("https://fonts.googleapis.com/css?family=Ubuntu");}');
  16. GM_addStyle('* .coordinates {font-family: Ubuntu;}');
  17. GM_addStyle('* #leaderboard-panel {font-size: 24px;}');
  18. var fillTextz = CanvasRenderingContext2D.prototype.fillText;
  19. CanvasRenderingContext2D.prototype.fillText = function(){
  20. var argumentz = arguments;
  21. if(this.canvas.id == 'leaderboard-canvas'){
  22. this.font = 'bold 15px Ubuntu';
  23. }
  24. if(this.canvas.id == 'minimap-canvas'){
  25. this.font = 'bold 15px Ubuntu';
  26. }
  27. if(this.canvas.id == 'party-canvas'){
  28. this.font = 'bold 15px Ubuntu';
  29. }
  30. fillTextz.apply(this, arguments);
  31. };
  32. function addStyleSheet(style){
  33. var getHead = document.getElementsByTagName("HEAD")[0];
  34. var cssNode = window.document.createElement( 'style' );
  35. var elementStyle= getHead.appendChild(cssNode);
  36. elementStyle.innerHTML = style;
  37. return elementStyle;
  38. }
  39. //DoubleSplit(Press D)
  40. (function() {
  41. var amount = 2;
  42. var duration = 1; //ms
  43. var overwriting = function(evt) {
  44. if (evt.keyCode === 68) { // KEY_D
  45. for (var i = 0; i < amount; ++i) {
  46. setTimeout(function() {
  47. window.onkeydown({keyCode: 32}); // KEY_space
  48. window.onkeyup({keyCode: 32});
  49. }, i * duration);
  50. }
  51. }
  52. };
  53. window.addEventListener('keydown', overwriting);
  54. })();
  55. //Triple(Press E)
  56. (function() {
  57. var amount = 3;
  58. var duration = 1; //ms
  59. var overwriting = function(evt) {
  60. if (evt.keyCode === 69) { // KEY_E
  61. for (var i = 0; i < amount; ++i) {
  62. setTimeout(function() {
  63. window.onkeydown({keyCode: 32}); // KEY_space
  64. window.onkeyup({keyCode: 32});
  65. }, i * duration);
  66. }
  67. }
  68. };
  69. window.addEventListener('keydown', overwriting);
  70. })();
  71. //16xSplit (Press Q)
  72. (function() {
  73. var amount = 4;
  74. var duration = 1; //ms
  75. var overwriting = function(evt) {
  76. if (evt.keyCode === 81) { // KEY_Q
  77. for (var i = 0; i < amount; ++i) {
  78. setTimeout(function() {
  79. window.onkeydown({keyCode: 32}); // KEY_space
  80. window.onkeyup({keyCode: 32});
  81. }, i * duration);
  82. }
  83. }
  84. };
  85. window.addEventListener('keydown', overwriting);
  86. })();
  87. //LineSplitKey
  88. document.onkeydown = checkKey;
  89. function checkKey(e) {
  90. e = e || window.event;
  91. if (e.keyCode == '70') {
  92. player.mouseRawX = canvas.width / 2;
  93. player.mouseRawY = canvas.height / 2;
  94. }
  95. }
  96. //Custom Crosshair
  97. GM_addStyle ('* body {cursor: crosshair;}');
  98. //Version
  99. var maincontent = document.getElementById("main-content");
  100. var ffscversion = document.createElement("div");
  101. ffscversion.innerHTML = 'Version: 1.1 || By Freebie';
  102. ffscversion.id = 'ffecscript';
  103. maincontent.appendChild(ffscversion);
  104. document.getElementById("ffecscript").style.textAlign = "center";
  105. document.getElementById("ffecscript").style.fontSize = "12px";
  106. document.getElementById("ffecscript").style.color = "white";
  107. //social buttons remove
  108. $(".main-bottom-links").replaceWith("");
  109. //Border Removal
  110. document.getElementById("leaderboard-panel").style.borderRadius = "0";
  111. document.getElementById("leaderboard-panel").style.borderWidth = "0px";
  112. document.getElementById("leaderboard-panel").style.boxShadow = "0px 0px 0px black";
  113. document.getElementById("score-panel").style.borderRadius = "4px";
  114. document.getElementById("score-panel").style.borderWidth = "0px";
  115. document.getElementById("score-panel").style.boxShadow = "0px 2px 0px gray";
  116. document.getElementById("minimap-panel").style.borderRadius = "0";
  117. document.getElementById("minimap-panel").style.borderWidth = "0px";
  118. document.getElementById("minimap-panel").style.boxShadow = "0px 0px 0px black";
  119. document.getElementById("minimap-panel").style.marginBottom = "3px";
  120. document.getElementById("party-panel").style.borderRadius = "0";
  121. document.getElementById("party-panel").style.borderWidth = "0px";
  122. document.getElementById("party-panel").style.boxShadow = "0px 0px 0px black";
  123. //Custom Borders
  124. GM_addStyle('* .main-panel {border: solid 3px rgba(99, 97, 95, 0.5)}');
  125. GM_addStyle('* .main-panel {border-radius: 0px}');
  126. GM_addStyle('* .main-panel {box-shadow: 0px 0px 0px 0px rgba(0,0,0,0.52)}');
  127. GM_addStyle('* .gota-btn {border-radius: 15px}');
  128. GM_addStyle('* .main-bottom-stats {border-radius: 7px}');
  129. GM_addStyle('* #popup-party {border-radius: 0px}');
  130. GM_addStyle('* #popup-party {box-shadow: 0px 0px 0px 0px rgba(0,0,0,0.25)}');
  131. GM_addStyle('* #popup-login {border-radius: 0px}');
  132. GM_addStyle('* #popup-login {box-shadow: 0px 0px 0px 0px rgba(0,0,0,0.25)}');
  133. GM_addStyle('* .login-input {border-radius: 2px}');
  134. GM_addStyle('* #chat-input {border-radius: 0 0 0px 0px}');
  135. GM_addStyle('* .ui-pane {box-shadow: 0px 0px 0px 0px rgba(0,0,0,0.52)}');
  136. //Miscellaneous UI Changing code
  137. GM_addStyle('* #chat-panel {width: 300px}');
  138. GM_addStyle('* #chat-panel {height: 195px}');
  139. GM_addStyle('* #chat-input {font-weight: bold}');
  140. GM_addStyle('* .stext {margin-top: 2px}');
  141. GM_addStyle('* .stext {margin-bottom: 2px}');
  142. //For LeaderBoard
  143. var fz = " ๖ۣۣۜLęądeŗ๖ۣۣۜBσard";
  144. //LeaderBoard
  145. $(".lh").replaceWith(fz);
  146. $("#main-rb").replaceWith("");
  147. GM_addStyle ('* #main {left: 350px;}');
  148. //Score Panel
  149. setInterval(function() {
  150. document.getElementById("score-panel").innerText = " Score: " + player.score + " " + "\n Fps: " + fps + " " + "\n Cells: " + player.myCells.length + "/16" + " " + " " + "\n \n Rainbow: F2 \n Alpha: F4 \n Zoom: ~ \n " + "ℬᎩ ℱℛℯℯℬℐℯ ";
  151. }, 100);
  152. //Keypress
  153. document.addEventListener('keydown', function(e) {
  154. var key = e.keyCode || e.which;
  155. switch (key) {
  156. case 113:
  157. if (player.rainbow === false) {
  158. player.rainbow = true;
  159. } else {
  160. player.rainbow = false;
  161. }
  162. }
  163. });
  164. document.addEventListener('keydown', function(e) {
  165. var key = e.keyCode || e.which;
  166. switch (key) {
  167. case 115:
  168. if (settings.alpha === 1) {
  169. settings.alpha = 0.4;
  170. } else {
  171. settings.alpha = 1;
  172. }
  173. }
  174. });
  175. document.addEventListener('keydown', function(e) {
  176. var key = e.keyCod || e.which;
  177. switch (key) {
  178. case 192:
  179. player.mouseZoom = player.mouseZoom - 0.1;
  180. }
  181. });

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址