Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name DummyBots
- // @namespace https://youtube.com/c/slxshergota/
- // @version 2.2
- // @description the best bots
- // @author Slxsher | Chrone
- // @match *.ac-clan.glitch.me/*
- // @match *.agar.bio/*
- // @match *.gota.io/*
- // @match *.mk-agario.glitch.me/*
- // @match *.cellcraft.io/*
- // @match *.army.ovh/web/*
- // @match *.targ.io/*
- // @match *.play.agario0.com/*
- // @match *.cellagar.ml/*
- // @match *.balz.io/*
- // @match *.ogar.be/*
- // @match *.agario.top/*
- // @match *.agocell.eu/*
- // @match *.agix.pw/*
- // @match *.biobots.tk/*
- // @match *.dummyclient.glitch.me/*
- // @match *.agar.red/*
- // @grant none
- // @run-at document-start
- // ==/UserScript==
- const observer = new MutationObserver(mutations => {
- mutations.forEach(({
- addedNodes
- }) => {
- addedNodes.forEach(node => {
- if (node.nodeType === 1 && node.tagName === 'SCRIPT') {
- const src = node.src || '';
- if (src.includes('assets/js/ext.js')) {
- node.src = '';
- window.playnow = () => {
- setNick(document.getElementById('nick').value);
- return false;
- }
- }
- if (src.includes('minimap.js') || node.innerHTML.toString().includes('cicklow_XcVCCW')) {
- node.type = 'javascript/blocked';
- node.parentElement.removeChild(node);
- }
- }
- });
- });
- });
- observer.observe(document.documentElement, {
- childList: true,
- subtree: true
- });
- class User {
- constructor() {
- this.wsIp = 'ws://dummybot1-rickard93.c9users.io:8081';
- this.started = false;
- this.mouseInt = -1;
- this.byteLen = 0;
- this.ws = null;
- this.connect();
- this.addUI();
- }
- connect() {
- this.ws = new WebSocket(this.wsIp);
- this.ws.onmessage = this.onmessage.bind(this);
- this.ws.onerror = this.onerror.bind(this);
- this.ws.onclose = this.onclose.bind(this);
- this.ws.onopen = this.onopen.bind(this);
- }
- onopen() {
- this.startMouseInt();
- this.started = false;
- }
- startMouseInt() {
- this.mouseInt = setInterval(() => {
- let json = {};
- json.type = "updatePos";
- json.x = this.x;
- json.y = this.y;
- json.byteLen = this.byteLen;
- this.send(json);
- }, 50);
- }
- sendChat(message) {
- let json = {};
- json.type = "chat";
- json.msg = message;
- this.send(json);
- }
- onmessage(message) {
- message = JSON.parse(message.data);
- switch (message.type) {
- case 'botCount':
- document.getElementById('botCount').innerText = `${message.connected}/${message.maxBots}`;
- break;
- }
- }
- onclose() {
- setTimeout(this.connect(), 1500);
- clearInterval(this.mouseInt);
- }
- startBots() {
- let json = {};
- json.type = "start";
- json.ip = this.server;
- this.send(json);
- }
- stopBots() {
- this.send({
- type: 'stop'
- });
- }
- addUI() {
- let ui = document.createElement('div');
- ui.id = 'botcanvas';
- ui.style['background'] = 'rgba(0,20,0)';
- ui.style['top'] = '50px';
- ui.style['left'] = '50px';
- ui.style['display'] = 'block';
- ui.style['position'] = 'absolute';
- ui.style['text-align'] = 'center';
- ui.style['font-size'] = '25px';
- ui.style['color'] = '#FF0000';
- ui.style['padding'] = '20px';
- ui.style['z-index'] = '1000000';
- ui.style['border-radius'] = '25px';
- ui.innerHTML += 'DummyBots.cf: ';
- let count = document.createElement('span');
- count.id = 'botCount';
- count.innerHTML = ':)';
- ui.appendChild(count);
- document.body.appendChild(ui);
- document.getElementById('botcanvas').onclick = () => {
- if (!this.started)
- this.startBots();
- else
- this.stopBots();
- this.started = !this.started;
- };
- }
- onerror() {}
- send(message) {
- if (this.ws && this.ws.readyState == 1) this.ws.send(JSON.stringify(message));
- }
- get isTyping() {
- return document.querySelectorAll('input:focus').length;
- }
- keyDown(event) {
- if (this.isTyping || !event.key) return;
- switch (event.key.toLowerCase()) {
- case 'e':
- this.send({
- type: 'split'
- });
- break;
- case 'r':
- this.send({
- type: 'eject'
- });
- break;
- case 's':
- this.send({
- type: 'stop'
- });
- break;
- case 'c':
- let msg = prompt('What do you want the bots spam?', 'Dummybots.cf is the best bots company');
- if (msg) this.sendChat(msg);
- break;
- }
- }
- }
- window.addEventListener("load", () => {
- const client = new User();
- document.addEventListener('keydown', client.keyDown.bind(client));
- WebSocket.prototype.realSend = WebSocket.prototype.send;
- WebSocket.prototype.send = function (pkt) {
- this.realSend(pkt);
- if (typeof pkt == 'string') return;
- if (this.url.includes('localhost')) return;
- if (pkt instanceof ArrayBuffer) pkt = new DataView(pkt);
- else if (pkt instanceof DataView) pkt = pkt;
- else pkt = new DataView(pkt.buffer);
- switch (pkt.getUint8(0, true)) {
- case 16:
- client.byteLen = pkt.byteLength;
- switch (pkt.byteLength) {
- case 13:
- case 9:
- client.x = pkt.getInt32(1, true);
- client.y = pkt.getInt32(5, true);
- break;
- case 21:
- client.x = pkt.getFloat64(1, true);
- client.y = pkt.getFloat64(9, true);
- break;
- }
- break;
- }
- if (client.server !== this.url) {
- client.server = this.url;
- }
- };
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement