0% found this document useful (0 votes)
22 views

Message

Uploaded by

imhimm048
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)
22 views

Message

Uploaded by

imhimm048
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
You are on page 1/ 3

// ==UserScript==

// @name McDuckify's Rain Joiner


// @namespace http://tampermonkey.net/
// @version 3.1
// @description Automatically joins rain in Bloxflip with UI controls.
// @author McDuckify
// @match https://bloxflip.com/*
// @icon https://www.example.com/icon.png
// @grant none
// ==/UserScript==

(function() {
'use strict';

let intervalId;

function autoJoinRain() {
let joinButton =
Array.from(document.getElementsByTagName('button')).find(button =>
button.textContent.includes('Join For Free'));
if (joinButton) {
joinButton.click();
console.log("Joined rain successfully!");
} else {
console.log("Join For Free button not found, retrying...");
}
}

function createUI() {
let controls = document.createElement('div');
controls.id = 'controls';
controls.style.position = 'fixed';
controls.style.top = '50%';
controls.style.left = '50%';
controls.style.transform = 'translate(-50%, -50%)';
controls.style.background = '#333';
controls.style.color = '#fff';
controls.style.border = '1px solid #444';
controls.style.padding = '20px';
controls.style.borderRadius = '10px';
controls.style.boxShadow = 'none'; // Remove the shadow
controls.style.cursor = 'move';
controls.style.zIndex = '9999'; // Ensure the UI is on top
controls.style.overflow = 'hidden'; // Ensure overflow doesn't interfere
with the glow
controls.innerHTML = `
<div style="text-align: center; font-size: 18px; margin-bottom:
10px;">McDuckify's Rain Joiner</div>
<button id="start" style="background: #007bff; color: #fff; border:
none; padding: 10px 20px; border-radius: 5px; cursor: pointer; margin: 5px;">Start
Auto Join</button>
<button id="stop" style="background: #007bff; color: #fff; border:
none; padding: 10px 20px; border-radius: 5px; cursor: pointer; margin: 5px;">Stop
Auto Join</button>
`;
document.body.appendChild(controls);

let isDragging = false;


let offsetX, offsetY;
controls.addEventListener('mousedown', (e) => {
isDragging = true;
offsetX = e.clientX - controls.getBoundingClientRect().left;
offsetY = e.clientY - controls.getBoundingClientRect().top;
controls.style.cursor = 'grabbing';
});

document.addEventListener('mousemove', (e) => {


if (isDragging) {
controls.style.left = `${e.clientX - offsetX}px`;
controls.style.top = `${e.clientY - offsetY}px`;
controls.style.transform = 'none';
}
});

document.addEventListener('mouseup', () => {
isDragging = false;
controls.style.cursor = 'move';
});

document.getElementById('start').addEventListener('click', () => {
if (!intervalId) {
intervalId = setInterval(autoJoinRain, 1000);
document.getElementById('start').style.background = '#003366'; //
Dark blue when activated
console.log("Auto join started.");
}
});

document.getElementById('stop').addEventListener('click', () => {
if (intervalId) {
clearInterval(intervalId);
intervalId = null;
document.getElementById('stop').style.background = '#003366'; //
Dark blue when activated
document.getElementById('start').style.background = '#007bff'; //
Reset start button color to normal blue
console.log("Auto join stopped.");
}
});

// Reset button colors on mouse up outside the buttons


document.addEventListener('mouseup', (e) => {
if (e.target !== document.getElementById('start')) {
document.getElementById('start').style.background = '#007bff';
}
if (e.target !== document.getElementById('stop')) {
document.getElementById('stop').style.background = '#007bff';
}
});

// Create the blue neon border effect


let glow = document.createElement('div');
glow.style.position = 'absolute';
glow.style.top = '0';
glow.style.left = '0';
glow.style.width = 'calc(100% - 2px)'; // Adjust to avoid overlap with
border
glow.style.height = 'calc(100% - 2px)'; // Adjust to avoid overlap with
border
glow.style.border = '1px solid #007bff';
glow.style.borderRadius = '10px';
glow.style.pointerEvents = 'none'; // Ensure the glow doesn't interfere
with clicking buttons
controls.appendChild(glow);
}

createUI();
})();

You might also like