Bloble.io Zoom Hack

Zoom Mods, Bloble.io , No Ads Very Useful

  1. // ==UserScript==
  2. // @name Bloble.io Zoom Hack
  3. // @namespace none
  4. // @version 1.1
  5. // @description Zoom Mods, Bloble.io , No Ads Very Useful
  6. // @author fb.com/Menaylex
  7. // @match http://bloble.io/*
  8. // @match http://www.bloble.io/*
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12.  
  13. var scroll=0;
  14. mainCanvas["addEventListener"]?(window["addEventListener"]("mousewheel",zoom,!1),mainCanvas["addEventListener"]("DOMMouseScroll",zoom,!1)):window["attachEvent"]("onmousewheel",zoom);function zoom(a)
  15. {
  16. a= window["event"]|| a;a["preventDefault"]();a["stopPropagation"]();scroll= Math["max"](-1,Math["min"](1,a["wheelDelta"]|| -a["detail"]));if(scroll== -1)
  17. {
  18. if(maxScreenHeight< 10000)
  19. {
  20. (maxScreenHeight+= 250,maxScreenWidth+= 250,resize());scroll= 0
  21. }
  22. }
  23. if(scroll== 1)
  24. {
  25. if(maxScreenHeight> 1000)
  26. {
  27. (maxScreenHeight-= 250,maxScreenWidth-= 250,resize());scroll= 0
  28. }
  29. }
  30. }
  31. mainCanvas["onkeydown"]= function(event)
  32. {
  33. var k=event["keyCode"]?event["keyCode"]:event["which"];
  34. if(k== 70)
  35. {
  36. if(maxScreenHeight< 10000)
  37. {
  38. (maxScreenHeight+= 250,maxScreenWidth+= 250,resize())
  39. }
  40. }
  41. if(k== 67)
  42. {
  43. if(maxScreenHeight> 1000)
  44. {
  45. (maxScreenHeight-= 250,maxScreenWidth-= 250,resize())
  46. }
  47. }
  48. {
  49. if(65== a|| 37== a)
  50. {
  51. cameraKeys["l"]= 0,updateCameraInput()
  52. }
  53. if(68== a|| 39== a)
  54. {
  55. cameraKeys["r"]= 0,updateCameraInput()
  56. }
  57. if(87== a|| 38== a)
  58. {
  59. cameraKeys["u"]= 0,updateCameraInput()
  60. }
  61. if(83== a|| 40== a)
  62. {
  63. cameraKeys["d"]= 0,updateCameraInput()
  64. }
  65. if(32== a)
  66. {
  67. var d=unitList["indexOf"](activeUnit);
  68. sendUnit(d)
  69. }
  70. void(0)!= upgrInputsToIndex["k"+ a]&& toggleActiveUnit(upgrInputsToIndex["k"+ a]);46== a&& selUnits["length"]&& sellSelUnits();84== a&& toggleChat("none"== chatListWrapper["style"]["display"]);27== a&& (toggleActiveUnit(),disableSelUnit(),showSelector= !1);82== a&& (camY= camX= 0)
  71. }
  72. }
  73. ;mainCanvas["onkeydown"]= function(a)
  74. {
  75. a= a["keyCode"]?a["keyCode"]:a["which"];socket&& player&& !player["dead"]&& (65!= a&& 37!= a|| cameraKeys["l"]|| (cameraKeys["l"]= -1,cameraKeys["r"]= 0,updateCameraInput()),68!= a&& 39!= a|| cameraKeys["r"]|| (cameraKeys["r"]= 1,cameraKeys["l"]= 0,updateCameraInput()),87!= a&& 38!= a|| cameraKeys["u"]|| (cameraKeys["u"]= -1,cameraKeys["d"]= 0,updateCameraInput()),83!= a&& 40!= a|| cameraKeys["d"]|| (cameraKeys["d"]= 1,cameraKeys["u"]= 0,updateCameraInput()))
  76. }