Skip to content

Commit 01c0eb8

Browse files
authored
Add files via upload
1 parent fc964c3 commit 01c0eb8

File tree

3 files changed

+1237
-1208
lines changed

3 files changed

+1237
-1208
lines changed

ai-aimbot/script.js

Lines changed: 36 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ document.addEventListener('DOMContentLoaded', () => {
33
const ctx = canvas.getContext('2d');
44
const snowflakes = document.querySelectorAll('.snow');
55
const nodes = [];
6+
let mouseX = 0;
7+
let mouseY = 0;
68

79
canvas.width = window.innerWidth;
810
canvas.height = window.innerHeight;
@@ -16,18 +18,34 @@ document.addEventListener('DOMContentLoaded', () => {
1618
});
1719
});
1820

21+
// Add mouse position as a special node
22+
nodes.push({
23+
x: mouseX,
24+
y: mouseY,
25+
isCursor: true
26+
});
27+
1928
function drawConnections() {
2029
ctx.clearRect(0, 0, canvas.width, canvas.height);
2130
for (let i = 0; i < nodes.length; i++) {
2231
for (let j = i + 1; j < nodes.length; j++) {
2332
const dx = nodes[i].x - nodes[j].x;
2433
const dy = nodes[i].y - nodes[j].y;
2534
const distance = Math.sqrt(dx * dx + dy * dy);
26-
if (distance < 150) {
35+
const maxDistance = nodes[i].isCursor || nodes[j].isCursor ? 200 : 150;
36+
37+
if (distance < maxDistance) {
2738
ctx.beginPath();
2839
ctx.moveTo(nodes[i].x, nodes[i].y);
2940
ctx.lineTo(nodes[j].x, nodes[j].y);
30-
ctx.strokeStyle = `rgba(255, 0, 0, ${1 - distance / 3000})`;
41+
42+
// Use a different color for cursor connections
43+
if (nodes[i].isCursor || nodes[j].isCursor) {
44+
ctx.strokeStyle = `rgba(0, 255, 255, ${1 - distance / maxDistance + 0.1})`;
45+
} else {
46+
ctx.strokeStyle = `rgba(255, 0, 0, ${1 - distance / maxDistance})`;
47+
}
48+
3149
ctx.lineWidth = 0.8;
3250
ctx.stroke();
3351
ctx.closePath();
@@ -37,14 +55,25 @@ document.addEventListener('DOMContentLoaded', () => {
3755
}
3856

3957
function update() {
40-
nodes.forEach(node => {
41-
const rect = node.element.getBoundingClientRect();
42-
node.x = rect.left + rect.width / 7.5;
43-
node.y = rect.top + rect.height / 7.5;
58+
nodes.forEach((node, index) => {
59+
if (node.isCursor) {
60+
node.x = mouseX;
61+
node.y = mouseY;
62+
} else {
63+
const rect = node.element.getBoundingClientRect();
64+
node.x = rect.left + rect.width / 7.5;
65+
node.y = rect.top + rect.height / 7.5;
66+
}
4467
});
4568
drawConnections();
4669
requestAnimationFrame(update);
4770
}
4871

72+
// Track mouse movement
73+
document.addEventListener('mousemove', (e) => {
74+
mouseX = e.clientX;
75+
mouseY = e.clientY;
76+
});
77+
4978
update();
50-
});
79+
});

0 commit comments

Comments
 (0)