0% found this document useful (0 votes)
12 views9 pages

Circle Hitboxes Script for Sploop.io

This document is a user script for the game Sploop.io that enhances the visual representation of hitboxes by using accurate circle hitboxes for player versus player interactions. It includes customizable options for hitbox color and the ability to remove certain visual elements, while also providing a detailed implementation of drawing functions and entity management. The script is designed to improve gameplay experience by making hitboxes more visible and accurate.

Uploaded by

liamoleary0909
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views9 pages

Circle Hitboxes Script for Sploop.io

This document is a user script for the game Sploop.io that enhances the visual representation of hitboxes by using accurate circle hitboxes for player versus player interactions. It includes customizable options for hitbox color and the ability to remove certain visual elements, while also providing a detailed implementation of drawing functions and entity management. The script is designed to improve gameplay experience by making hitboxes more visible and accurate.

Uploaded by

liamoleary0909
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

// ==UserScript==

// @name Circle hitboxes - Sploop


// @namespace [Link]
// @version 2024-04-30
// @description Accurate Circle Hitboxes For PvP in [Link]!
// @author fizzixww
// @match [Link]
// @icon [Link]
// @grant none
// @license MIT
// @downloadURL [Link]
%[Link]
// @updateURL [Link]
%[Link]
// ==/UserScript==
const hitbox_Circle_Colour = "#black"; //Choose the colour of the hitboxes! (search
Hex Colour Picker in google)

const Remove_weird_circle_above_animals = 1; //(not recommended) Set this to 1 to


remove the weird looking circle above animals. however, you will not be able to see
other players hitboxes if you do this.

//Code derived from Nudos visual extention.


(function() {
class Visuals {
constructor() {
[Link] = {
color: {
all: "#fff",
rainbow: false
},
visible: 1
};
[Link] = {
active: true,
disttag: true,
dashline: false,
color: {
entity: "#cc5151",
ally: "#a4cc4f",
rainbow: false
},
size: 1,
visible: 1
};
[Link] = {
active: false,
dashline: false,
color: {
all: "#5174cd",
rainbow: false
},
size: 1,
visible: 1
};
[Link] = {
old: [Link](),
hue: 0,
power: 3,
time: 10
};
[Link] = [0, [Link]()];
}

rainbowColor() {
if (![Link] || [Link]() - [Link] >=
[Link]) {
[Link] += [Link] * [Link]();
[Link] = [Link]();
}
[Link] = `hsl(${[Link]}, 100%, 50%)`;
}

drawText(text, x, y) {
[Link]();
[Link] = '18px "Baloo Paaji"';
[Link] = 8;
[Link] = "#3d3f42";
[Link] = [Link];
[Link] = 'center';
[Link] = [Link] ? [Link] :
[Link];
[Link](text, x, y);
[Link](text, x, y);
[Link]();
}

updateOffset() {
if (![Link][1] || [Link]() - [Link][1] >= 10) {
[Link][0]++;
[Link][1] = [Link]();
}
}

dashLine() {
[Link]([18, 6, 6, 6]);
[Link] = -[Link][0];
}
}

let visuals = new Visuals();

class fizzBurger {
constructor() {
[Link] = [];
[Link] = [];
[Link] = {
active: false,
positions: [],
maxPositions: 50 //amount
};
}

drawCircle(x, y, imgWidth, imgHeight, rotation, rad) {


const radius = rad;
const offset = -radius;
const centerX = x + imgWidth / 2;
const centerY = y + imgHeight / 2;
const rotatedX = centerX + (radius + offset) * [Link](rotation);
const rotatedY = centerY + (radius + offset) * [Link](rotation);
[Link]();
[Link]();
[Link](rotatedX, rotatedY, radius, 0, 2 * [Link]);
[Link] = 2;
[Link] = hitbox_Circle_Colour;
[Link]();
[Link]();
}
updatePositions(x, y) {
[Link]({
x,
y
});

if ([Link] > [Link])


{
[Link]();
}
}

drawAllCircles() {
[Link](({
x,
y,
imgWidth,
imgHeight,
rotation
}) => {
[Link](x, y, imgWidth, imgHeight, rotation);
});
}
}

let QuickQuix = new fizzBurger();

let Context;

let {
clearRect,
fillRect,
fillText,
drawImage
} = [Link];

[Link] = function(x, y, width, height) {


if ([Link] === "game-canvas") {
Context = [Link]("2d");
}
return [Link](this, arguments);
};

[Link] = function(x, y, width, height) {


if ([Link]("homepage").[Link] == "none") {
[Link]();
if ([Link] == "#a4cc4f") {}
} else {
[Link] = false;
}
return [Link](this, arguments);
};

const imageRadii = {
"[Link] 90,
"[Link] 75,
"[Link] 90,
"[Link] 76,
"[Link] 45,
"[Link] 45,
"[Link] 45,
"[Link] 60,
"[Link] 40,
"[Link] 40,
"[Link] 45,
"[Link] 54,
"[Link] 50,
"[Link] 42,
//"[Link] 220,
"[Link] 50,
"[Link] 50,
"[Link] 50,
"[Link] 45,
"[Link] 45,
"[Link] 90,
"[Link] 40,
"[Link] 80,
"[Link] 90,
"[Link] 59,
"[Link] 50,
"[Link] 50,
"[Link] 90,
//"[Link] 90,
"[Link] 92,
"[Link] 92,
"[Link] 58,
"[Link] 100,
"[Link] 92,
"[Link] 20,
"[Link] 35,
"[Link] 20,
"[Link] 90,
"[Link] 100,
"[Link] 80,
"[Link] 80,
"[Link] 100,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
//more bodies added incase of future skins dont worry I didnt type them all
out thanks for caring
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
"[Link] 35,
};
[Link] = function(img, ...args) {
if ([Link] === "game-canvas") {
const imageURL = [Link];
const radius = imageRadii[imageURL] || 0.0;

if (imageURL in imageRadii) {
const x = args[0];
const y = args[1];
const width = args[2];
const height = args[3];
const rotation = args[4] || 0;

[Link](this, [img, ...args]);


[Link](x, y, width, height, rotation, radius);
return;
}
}
return [Link](this, [img, ...args]);
};
})();

//following function draws a second circle using healthbar so that player hitbox
can be seen above hat.

(function() {
class xXSploopyTailXx {
constructor() {
[Link] = {
color: {
all: "#fff"
},
visible: 1
};
[Link] = {};
[Link] = [0, [Link]()];
}

xXsploopyColorsXx() {
if (![Link] || [Link]() - [Link] >=
[Link]) {
[Link] += [Link] * [Link]();
[Link] = [Link]();
}
[Link] = `hsl(${[Link]}, 100%, 50%)`;
}

xXsploopyOffsetXx() {
if (![Link][1] || [Link]() - [Link][1] >= 10) {
[Link][0]++;
[Link][1] = [Link]();
}
}
}

let xXsploopyTextXx = new xXSploopyTailXx();

class xXSploopyLooperXx {
constructor() {
[Link] = {
position: {
x: 0,
y: 0
},
maxPositions: 50
};
}

drawXxSplooptailXx(x, y) {
const radius = 35;

[Link]();
[Link]();
[Link](x, y, radius, 0, 2 * [Link]);
[Link] = 2;
[Link] = hitbox_Circle_Colour;
[Link]();
[Link]();
}

updateXxSploopyPositionXx(x, y) {
[Link] = {
x,
y
};
}

drawXxSploopyCircleXx() {
const {
x,
y
} = [Link];
[Link](x, y);
}
}

let xXsploopyLooperXx = new xXSploopyLooperXx();

let Context;

let {
clearRect,
fillRect
} = [Link];

[Link] = function(x, y, width, height) {


if ([Link] === "game-canvas") {
Context = [Link]("2d");
[Link]();
}
return [Link](this, arguments);
};

[Link] = function(x, y, width, height) {


if ([Link]("homepage").[Link] == "none") {
[Link]();
if ([Link] == "#a4cc4f") {
[Link](x + 48, y - 70);
[Link]();
}
if ([Link] == "#cc5151" && Remove_weird_circle_above_animals
=== 0) {
[Link](x + 48, y - 70);
[Link]();
}
}
return [Link](this, arguments);
};
})();

You might also like