Advertisement
Guest User

Untitled

a guest
Oct 20th, 2019
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.00 KB | None | 0 0
  1. // ==UserScript==
  2. // @name Starve - kmccord1 + Chromium Script
  3. // @namespace http://tampermonkey.net/
  4. // @version WhoKnows
  5. // @description starve dieing from the inside :o
  6. // @author kmccord1 + Chromium
  7. // @match https://starve.io/
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. // VARS
  13. var log = setInterval(tick,1000)
  14. var bootloop = setInterval(runbots,17);
  15. var bots = new Array();
  16. var botsconnecting = 0;
  17. var delay = 0;
  18. // KEYS
  19.  
  20. // FUNCTIONS
  21. function botconnect()
  22. {
  23. botsconnecting = 0;
  24. for (var i = 0; i < bots.length; i++)
  25. {
  26. if (bots[i].connected == 0)
  27. {
  28. botsconnecting++;
  29. }
  30. }
  31. if (botsconnecting == 0)
  32. {
  33. var random = Math.round(Math.random() * 30);
  34. bots.push( new WebSocket("wss://" + Xm.ML[random].i + ":" + Xm.ML[random].p) );
  35. bots[bots.length - 1].connected = 0;
  36. bots[bots.length - 1].onopen = function()
  37. {
  38. bots[bots.length - 1].send(JSON.stringify(["omer is bad mod" + Math.round(Math.random()*1000),2120,1280,46,Math.round(Math.random()*50000000000000000000),"",0,0,0,0,0,1,0,0,0,null]))
  39. bots[bots.length - 1].connected = 1;
  40. }
  41. }
  42. }
  43. function filterbots()
  44. {
  45. for (var i = 0; i < bots.length; i++)
  46. {
  47. if (bots[i].connected == 1 && bots[i].readyState != 1)
  48. {
  49. bots.splice(i,1);
  50. }
  51. }
  52. }
  53. function dostuff()
  54. {
  55. delay++;
  56. if (delay >= 100)
  57. {
  58. delay = 0;
  59. for (var i = 0; i < bots.length; i++)
  60. {
  61. bots[i].send(JSON.stringify([13]));
  62. }
  63. }
  64. }
  65. function runbots()
  66. {
  67. filterbots();
  68. botconnect();
  69. }
  70. function tick()
  71. {
  72. console.log("Bots: " + bots.length);
  73. }
  74. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement