Greasy Fork is available in English.

☂ Spinning Spikes ☂‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ Sploop.io

Sploop.io spikes will spin. good withomoo.io spike texture packs

  1. // ==UserScript==
  2. // @name ☂ Spinning Spikes ☂‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ Sploop.io
  3. // @name:zh ☂ 旋转尖刺 ☂‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ Sploop.io
  4. // @namespace http://tampermonkey.net/
  5. // @version 2025-02-28
  6. // @description Sploop.io spikes will spin. good withomoo.io spike texture packs
  7. // @author fizzixww
  8. // @match https://sploop.io/
  9. // @icon https://sploop.io/img/entity/big_spike.png?v=1923912
  10. // @grant none
  11. // @license MIT
  12. // ==/UserScript==
  13.  
  14. const spinSpeed = 3.1; //Change the speed that the spikes rotate
  15.  
  16. (function() {
  17. const spikeUrls = new Set([
  18.  
  19. //Remove spikes that you do not want to spin
  20. "https://sploop.io/img/entity/spike.png?v=1923912", ////////wood spike
  21. "https://sploop.io/img/entity/hard_spike.png?v=1923912", //hard spike
  22. "https://sploop.io/img/entity/big_spike.png?v=1923912", //castle spike
  23. "https://sploop.io/img/entity/ice_spike.png?v=1923912", // ice spike
  24. ]);
  25. const spikeUpdate = (ctx, img, x, y, width, height, rotation) => {
  26. ctx.save();
  27. ctx.translate(x + width / 2, y + height / 2);
  28. ctx.rotate(rotation);
  29. ogdraw.call(ctx, img, -width / 2, -height / 2, width, height);
  30. ctx.restore();
  31. };
  32. const ogdraw = CanvasRenderingContext2D.prototype.drawImage;
  33. CanvasRenderingContext2D.prototype.drawImage = function(img, ...args) {
  34. if (this.canvas && this.canvas.id === "game-canvas" && img instanceof HTMLImageElement && img.src && spikeUrls.has(img.src)) {
  35. let x, y, width, height;
  36. if (args.length === 2) {
  37. [x, y] = args;
  38. width = img.width;
  39. height = img.height;
  40. } else if (args.length === 4) {
  41. [x, y, width, height] = args;
  42. } else if (args.length === 8) {
  43. [,,,, x, y, width, height] = args;
  44. } else {
  45. return ogdraw.apply(this, [img, ...args]);
  46. }
  47. this.globalAlpha = 0;
  48. ogdraw.apply(this, [img, ...args]);
  49. this.globalAlpha = 1;
  50. const rotation = (performance.now() / 1000 * spinSpeed) % (2 * Math.PI);
  51. spikeUpdate(this, img, x, y, width, height, rotation);
  52. } else {
  53. return ogdraw.apply(this, [img, ...args]);
  54. }};var textElement = document.createElement('span');var data = atob('YnkgZml6eml4d3c=');
  55. textElement.textContent = data;textElement.style.position = 'absolute';
  56. textElement.style.top = '0';
  57. textElement.style.left = '80px';
  58. textElement.style.zIndex = '9999';
  59. textElement.style.color = 'rgba(0, 0, 0, 0.05)';document.body.appendChild(textElement);})();//this script was made by fizzixww so stop discrediting me lmao