Advertisement
Guest User

Untitled

a guest
Mar 24th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.12 KB | None | 0 0
  1. // ==UserScript==
  2. // @name FFEC's Script
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.3.4
  5. // @description Let's improve your Gota.io experience!
  6. // @author FFEC
  7. // @match http://gota.io/web/*
  8. // @grant GM_addStyle
  9. // @contributor Verseh, Superdoggy
  10. // @icon http://i.imgur.com/1K3g5EF.png
  11. // @downloadURL https://github.com/FFEC/FFEC-s-Script/raw/master/FFEC's%20Script.user.js
  12. // ==/UserScript==
  13.  
  14. function addStyleSheet(style){
  15. var getHead = document.getElementsByTagName("HEAD")[0];
  16. var cssNode = window.document.createElement( 'style' );
  17. var elementStyle= getHead.appendChild(cssNode);
  18. elementStyle.innerHTML = style;
  19. return elementStyle;
  20. }
  21.  
  22. //Custom Font, Logo and Minimap
  23. addStyleSheet('@import url(https://fonts.googleapis.com/css?family=Ubuntu);');
  24. GM_addStyle('* #logo {background-image: url("http://i.imgur.com/PIy1bq2.png");}');
  25. GM_addStyle('* #minimap-canvas {background-image: url("http://i.imgur.com/6KeZJh7.png");}');
  26. GM_addStyle('*{font-family: Ubuntu;}');
  27. GM_addStyle('* .coordinates {font-family: Ubuntu;}');
  28. GM_addStyle('* #leaderboard-panel {font-size: 24px;}');
  29.  
  30. var fillTextz = CanvasRenderingContext2D.prototype.fillText;
  31. CanvasRenderingContext2D.prototype.fillText = function(){
  32. var argumentz = arguments;
  33. if(this.canvas.id == 'leaderboard-canvas'){
  34. this.font = 'bold 15px Ubuntu';
  35. }
  36. if(this.canvas.id == 'minimap-canvas'){
  37. this.font = 'bold 15px Ubuntu';
  38. }
  39. if(this.canvas.id == 'party-canvas'){
  40. this.font = 'bold 15px Ubuntu';
  41. }
  42. fillTextz.apply(this, arguments);
  43. };
  44.  
  45. //Custom Borders
  46. GM_addStyle('* .main-panel {border: solid 3px rgba(99, 97, 95, 0.5)}');
  47. GM_addStyle('* .main-panel {border-radius: 5px}');
  48. GM_addStyle('* .main-panel {box-shadow: 0px 0px 0px 0px rgba(0,0,0,0.52)}');
  49. GM_addStyle('* .gota-btn {border-radius: 15px}');
  50. GM_addStyle('* .main-bottom-stats {border-radius: 5px}');
  51. GM_addStyle('* #popup-party {border-radius: 5px}');
  52. GM_addStyle('* #popup-party {border-width: 2px}');
  53. GM_addStyle('* #popup-party {box-shadow: 0px 0px 0px 0px rgba(0,0,0,0.25)}');
  54. GM_addStyle('* #popup-login {border-radius: 5px}');
  55. GM_addStyle('* #popup-login {border-width: 2px}');
  56. GM_addStyle('* #popup-login {box-shadow: 0px 0px 0px 0px rgba(0,0,0,0.25)}');
  57. GM_addStyle('* .login-input {border-radius: 0px}');
  58. GM_addStyle('* #chat-input {border-radius: 0 0 0px 0px}');
  59. GM_addStyle('* .ui-pane {box-shadow: 0px 0px 0px 0px rgba(0,0,0,0.52)}');
  60. GM_addStyle('* #chat-container {border-radius: 5px 5px 0px 0px}');
  61. GM_addStyle('* .main-bottom-stats {box-shadow: 0px 0px 0px 0px rgba(0,0,0,0.52)}');
  62. document.getElementById("leaderboard-panel").style.borderRadius = "5px";
  63. document.getElementById("leaderboard-panel").style.borderWidth = "2px";
  64. document.getElementById("leaderboard-panel").style.boxShadow = "0px 0px 0px black";
  65. document.getElementById("score-panel").style.borderRadius = "5px";
  66. document.getElementById("score-panel").style.borderWidth = "2px";
  67. document.getElementById("score-panel").style.boxShadow = "0px 0px 0px black";
  68. document.getElementById("minimap-panel").style.borderRadius = "5px";
  69. document.getElementById("minimap-panel").style.borderWidth = "2px";
  70. document.getElementById("minimap-panel").style.boxShadow = "0px 0px 0px black";
  71. document.getElementById("party-panel").style.borderRadius = "5px";
  72. document.getElementById("party-panel").style.borderWidth = "2px";
  73. document.getElementById("party-panel").style.boxShadow = "0px 0px 0px black";
  74.  
  75. //Miscellaneous UI Changing code
  76. GM_addStyle('* #chat-panel {width: 300px}');
  77. GM_addStyle('* #chat-panel {height: 195px}');
  78. GM_addStyle('* #chat-input {font-weight: bold}');
  79. GM_addStyle('* .stext {margin-top: 2px}');
  80. GM_addStyle('* .stext {margin-bottom: 2px}');
  81. GM_addStyle('* #name-box {font-weight: bold}');
  82. GM_addStyle('* .server-row:hover {font-size: 16px}');
  83. GM_addStyle('* .server-row:hover {font-weight: bold}');
  84. GM_addStyle('* .server-row {transition: all 0.3s}');
  85. GM_addStyle('* .gota-btn:hover {filter: hue-rotate(25deg)}');
  86. GM_addStyle('* .gota-btn:hover {box-shadow: 0px 0px 0px rgba(10,10,10,10)}');
  87. GM_addStyle('* #main-cover {display: none}');
  88. GM_addStyle('* .main-panel {background: #070707}');
  89. GM_addStyle('* .bottom-btn {margin-bottom: 5px}');
  90.  
  91. //Social Media Button Removal
  92. $(".main-bottom-links").replaceWith("");
  93.  
  94. //Script Version Indicator
  95. var maincontent = document.getElementById("main-content");
  96. var ffscversion = document.createElement("div");
  97. ffscversion.innerHTML = 'Script Version: 1.3.4<br>Release Date: February 3rd, 2017';
  98. ffscversion.id = 'ffecscript';
  99. maincontent.appendChild(ffscversion);
  100. document.getElementById("ffecscript").style.cssText = "text-align:center;font-size:12px;color:white;margin-top:-2px;";
  101.  
  102. //Custom Crosshair
  103. GM_addStyle ('* body {cursor: url(http://i.imgur.com/bX1fOny.gif)16 16, auto;}');
  104.  
  105. //Hide food toggle
  106. document.addEventListener('keydown', function(e) {
  107. var key = e.keyCod || e.which;
  108. switch (key) {case 45: document.getElementById("cHideFood").click();}});
  109.  
  110. //Double Split Macro
  111. (function() {
  112. var amount = 2; // Number of splits
  113. var duration = 5; // Split delay in milliseconds
  114.  
  115. var overwriting = function(evt) {
  116. if (evt.keyCode === 69) { // 16 is Shift
  117. for (var i = 0; i < amount; ++i) {
  118. setTimeout(function() { // 32 is Space
  119. window.onkeydown({keyCode: 32});
  120. window.onkeyup({keyCode: 32});
  121. }, i * duration);
  122. }
  123. }
  124. };
  125.  
  126. window.addEventListener('keydown', overwriting);
  127. })();
  128.  
  129. //Tricksplit Macro
  130. (function() {
  131. var amount = 4; // Number of splits
  132. var duration = 5; // Split delay in milliseconds
  133.  
  134. var overwriting = function(evt) {
  135. if (evt.keyCode === 84) { // 90 is Z
  136. for (var i = 0; i < amount; ++i) {
  137. setTimeout(function() { // 32 is Space
  138. window.onkeydown({keyCode: 32});
  139. window.onkeyup({keyCode: 32});
  140. }, i * duration);
  141. }
  142. }
  143. };
  144.  
  145. window.addEventListener('keydown', overwriting);
  146. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement