Surviv.io Gun Color, Show Health and FPS

g0dak using this script lol

  1. // ==UserScript==
  2. // @name Surviv.io Gun Color, Show Health and FPS
  3. // @namespace http://tampermonkey.net/
  4. // @version 3.7.2
  5. // @description g0dak using this script lol
  6. // @author vnbpm YT
  7. // @license MIT
  8. // @match *://surviv.io/*
  9. // @match *://surviv2.io/*
  10. // @match *://2dbattleroyale.com/*
  11. // @match *://2dbattleroyale.org/*
  12. // @match *://piearesquared.info/*
  13. // @match *://thecircleisclosing.com/*
  14. // @match *://archimedesofsyracuse.info/*
  15. // @match *://secantsecant.com/*
  16. // @match *://parmainitiative.com/*
  17. // @match *://nevelskoygroup.com/*
  18. // @match *://kugahi.com/*
  19. // @match *://chandlertallowmd.com/*
  20. // @match *://ot38.club/*
  21. // @match *://kugaheavyindustry.com/*
  22. // @match *://drchandlertallow.com/*
  23. // @match *://rarepotato.com/*
  24. // @grant none
  25. // ==/UserScript==
  26. (function() {
  27. 'use strict';
  28. var colorweaponsbox = document.getElementsByClassName('ui-weapon-name')
  29. console.log(colorweaponsbox);
  30. for (var ii = 0; ii < colorweaponsbox.length; ii++) {
  31. colorweaponsbox[ii].addEventListener('DOMSubtreeModified', function() {
  32. var weaponInfo = this.textContent;
  33. var border = 'solid';
  34. switch (weaponInfo) {
  35. default:
  36. border = '#FFFFFF';
  37. border = 'solid';
  38. break;
  39. case "Fists":
  40. border += '#FFFFFF';
  41. break;
  42. case "Karambit":
  43. border +='#FFFFFF';
  44. break;
  45. case "Karambit Rugged":
  46. border +='#FFFFFF';
  47. break;
  48. case "Karmabit Prismatic":
  49. border +='#FFFFFF';
  50. break;
  51. case "Karmabit Drowned":
  52. border +='#FFFFFF';
  53. break;
  54. case "Bayonet":
  55. border +='#FFFFFF';
  56. break;
  57. case "Bayonet Rugged":
  58. border +='#FFFFFF';
  59. break;
  60. case "Bayonet Woodland":
  61. border +='#FFFFFF';
  62. break;
  63. case "Huntsman":
  64. border +='#FFFFFF';
  65. break;
  66. case "Huntsman Rugged":
  67. border +='#FFFFFF';
  68. break;
  69. case "Huntsman Burnished":
  70. border +='#FFFFFF';
  71. break;
  72. case "Bowie":
  73. border +='#FFFFFF';
  74. break;
  75. case "Bowie Vintage":
  76. border +='#FFFFFF';
  77. break;
  78. case "Bowie Frontier":
  79. border +='#FFFFFF';
  80. break;
  81. case "Wood Axe":
  82. border +='#FFFFFF';
  83. break;
  84. case "Blood Axe":
  85. border +='#FFFFFF';
  86. break;
  87. case "Fire Axe":
  88. border +='#FFFFFF';
  89. break;
  90. case "Katana":
  91. border +='#FFFFFF';
  92. break;
  93. case "Katana Rusted":
  94. border +='#FFFFFF';
  95. break;
  96. case "Katana Orchid":
  97. border +='#FFFFFF';
  98. break;
  99. case 'Naginata':
  100. border += '#FFFFFF';
  101. break;
  102. case "Machete":
  103. border +='#FFFFFF';
  104. break;
  105. case "Kukri":
  106. border +='#FFFFFF';
  107. break;
  108. case "Stone Hammer":
  109. border +='#FFFFFF';
  110. break;
  111. case "Sledgehammer":
  112. border +='#FFFFFF';
  113. break;
  114. case "Hook":
  115. border +='#FFFFFF';
  116. break;
  117. case "Pan":
  118. border +='#FFFFFF';
  119. break;
  120. case "Knuckles":
  121. border +='#FFFFFF';
  122. break;
  123. case "Knuckles Rusted":
  124. border +='#FFFFFF';
  125. break;
  126. case "Knuckles Heroic":
  127. border +='#FFFFFF';
  128. break;
  129. case "Bonesaw":
  130. border += '#FFFFFF';
  131. break;
  132. case "Spade":
  133. border +='#FFFFFF';
  134. break;
  135. case "Crowbar":
  136. border +='#FFFFFF';
  137. break;
  138. case "Kukri":
  139. border +='#FFFFFF';
  140. break;
  141. case "Bonesaw":
  142. border +='#FFFFFF';
  143. break;
  144. case "Katana":
  145. border +='#FFFFFF';
  146. break;
  147. case "War Hammer":
  148. border +='#FFFFFF';
  149. break;
  150. case 'CZ-3A1':
  151. case 'G18C':
  152. case 'M9':
  153. case 'M93R':
  154. case 'MAC-10':
  155. case 'MP5':
  156. case 'P30L':
  157. case 'Dual P30L':
  158. case 'UMP9':
  159. case 'Vector':
  160. case 'VSS':
  161. border += '#FFAE00';
  162. break;
  163. case 'M1100':
  164. case 'M870':
  165. case 'MP220':
  166. case 'Saiga-12':
  167. case 'SPAS-12':
  168. case 'Super 90':
  169. case 'USAS-12':
  170. case 'Hawk 12G':
  171. border += '#FF0000';
  172. break;
  173. case 'AK-47':
  174. case 'M134':
  175. case 'AN-94':
  176. case 'BAR M1918':
  177. case 'BLR 81':
  178. case 'DP-28':
  179. case 'Groza':
  180. case 'Groza-S':
  181. case 'M1 Garand':
  182. case 'M39 EMR':
  183. case 'Mosin-Nagant':
  184. case 'OT-38':
  185. case 'OTs-38':
  186. case 'PKP Pecheneg':
  187. case 'SCAR-H':
  188. case 'SV-98':
  189. case 'SVD-63':
  190. border += '#0066FF';
  191. break;
  192. case 'FAMAS':
  193. case 'L86A2':
  194. case 'M249':
  195. case 'M416':
  196. case 'M4A1-S':
  197. case 'Mk 12 SPR':
  198. case 'QBB-97':
  199. case 'Scout Elite':
  200. border += '#039E00';
  201. break;
  202. case 'M1911':
  203. case 'M1A1':
  204. case 'Mk45G':
  205. case 'Model 94':
  206. case 'Peacemaker':
  207. case 'Vector 45':
  208. border += '#7900FF';
  209. break;
  210. case 'M79':
  211. border += '#0CDDAB';
  212. break;
  213. case 'Flare Gun':
  214. border += '#D44600';
  215. break;
  216. case 'DEagle 50':
  217. border += '#292929';
  218. break;
  219. case 'AWM-S':
  220. case 'Mk 20 SSR':
  221. border += '#465000';
  222. break;
  223. case 'Potato Cannon':
  224. case 'Spud Gun':
  225. border += '#935924';
  226. break;
  227. case 'M9 Cursed':
  228. border += '#323232';
  229. break;
  230. case 'Bugle':
  231. border += '#F2BC21';
  232. break;
  233. case 'Frag':
  234. border += '#FFFFFF';
  235. break;
  236. case 'Mine':
  237. border += '#FFFFFF';
  238. break;
  239. case 'MIRV':
  240. border += '#FFFFFF';
  241. break;
  242. case 'Potato':
  243. border += '#FFFFFF';
  244. break;
  245. case 'Smoke':
  246. border += '#FFFFFF';
  247. break;
  248. case 'Snowball':
  249. border += '#FFFFFF';
  250. break;
  251. case 'Strobe':
  252. border += '#FFFFFF';
  253. break;
  254. case 'Iron Bomb':
  255. border += '#FFFFFF';
  256. break;
  257. }
  258. console.log(border);
  259. this.parentNode.style.border = border;
  260. }, false);
  261. }
  262. })();
  263. (function() {
  264. 'use strict';
  265. var colorweaponsbox = document.getElementsByClassName('ui-armor-level');
  266. console.log(colorweaponsbox);
  267. for (var ii = 0; ii < colorweaponsbox.length; ii++) {
  268. colorweaponsbox[ii].addEventListener('DOMSubtreeModified', function() {
  269. var armorlv = this.textContent;
  270. var border = 'solid';
  271. switch (armorlv) {
  272. default: border = '#000000';
  273. border = 'solid';
  274. break;
  275. case 'Lvl. 0':
  276. border += '#FFFFFF';
  277. break;
  278. case 'Lvl. 1':
  279. border += '#FFFFFF';
  280. break;
  281. case 'Lvl. 2':
  282. border += '#808080';
  283. break;
  284. case 'Lvl. 3':
  285. border += '#0C0C0C';
  286. break;
  287. case 'Lvl. 4':
  288. border += '#FFF00F';
  289. break;
  290. }
  291. console.log(border);
  292. this.parentNode.style.border = border;
  293. }, false);
  294. }
  295. })();
  296. //Health
  297. (function() {
  298. 'use strict';
  299. var HP = document.createElement("span");
  300. HP.setAttribute("id","my_Health");
  301. HP.style.color = "white";
  302. HP.style.fontSize = "25px";
  303. HP.style.display = "block";
  304. document.getElementById("ui-boost-counter").before(HP);
  305.  
  306. setInterval(function(){
  307. HP.innerHTML ="Health : " + Math.round(document.getElementById("ui-health-actual").style.width.slice(0,-1));
  308. if(document.getElementById("game-area-wrapper").style.display == "block" && document.getElementById("ui-stats").style.display == "none"){
  309. }
  310. },500);
  311. })();
  312. // FPS
  313. var first = true;
  314. (function() {
  315. 'use strict';
  316.  
  317. const times = [];
  318. let fps;
  319.  
  320. function refreshLoop() {
  321. window.requestAnimationFrame(() => {
  322. const now = performance.now();
  323. while (times.length > 0 && times[0] <= now - 1000) {
  324. times.shift();
  325. }
  326. times.push(now);
  327. fps = times.length;
  328. if (first) {
  329. var num = document.createElement("P");
  330. var text = document.createTextNode("FPS: " + Math.round(fps).toString());
  331. num.style.fontSize = "20px";
  332. num.style.textShadow = "rgb(255, 255, 255) 1px 0px 0px, rgb(255, 255, 255) 0.540302px 0.841471px 0px, rgb(255, 255, 255) -0.416147px 0.909297px 0px, rgb(255, 255, 255) -0.989992px 0.14112px 0px, rgb(255, 255, 255) -0.653644px -0.756802px 0px, rgb(255, 255, 255) 0.283662px -0.958924px 0px, rgb(255, 255, 255) 0.96017px -0.279415px 0px";
  333. num.style.color = "#32CD30";
  334. num.appendChild(text);
  335. num.setAttribute("id", "fps");
  336. document.getElementById("ui-top-left").appendChild(num);
  337. var credit = document.createElement("P");
  338. first = false;
  339. } else {
  340. document.getElementById("fps").innerHTML = "FPS: " + Math.round(fps).toString();
  341. }
  342. refreshLoop();
  343. });
  344. }
  345. refreshLoop();
  346. })();