Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name HyperBots.cf - Rekt this game using the best bots!
- // @namespace The best bot experience.
- // @version 1.0.1
- // @description Time to rekt this game using bots of HyperBots company.
- // @author NickDeveloper_ & SICKER
- // @match *.cellcraft.io/*
- // @match *.cellcraft.io/*
- // @grant none
- // ==/UserScript==
- /*
- * HyperBots.cf information:
- * - Bots in version BETA, if bots dont follow or much lag, contact support in website.
- */
- var menu_x = "150px",
- menu_y = "10px";
- var socketURL = "ws://hyper-bots-cf-support568.codeanyapp.com:8081/",
- socket = null,
- htmlToInject = '',
- botInfo = {
- counter: "OFFLINE",
- maxbots: 0,
- serverURL: null
- },
- userCordinates = {
- x: 0,
- y: 0,
- ma: 0,
- mb: 0
- };
- htmlToInject += "<div id='botMenu' style='position: absolute; top:" +menu_x+ "; left: " + menu_y + "; background-color: rgba(0,0,0,0.5); width: 220px; border-radius: 1px; text-align: center; padding-top: 29px; color: white; text-shadow: 0px 0px 1px black; font-weight: 900; font-size: 15px;z-index: 100000;'>";
- htmlToInject += '<center>HyperBots.cf</center><hr>';
- htmlToInject += "Bots: <span id='botlayer-bots' class='label label-info pull-right'>Connecting</span>";
- htmlToInject += "";
- htmlToInject += "";
- htmlToInject += "";
- htmlToInject += "";
- htmlToInject += "";
- htmlToInject += "";
- htmlToInject += "";
- htmlToInject += "</div>";
- (function() {
- window.__WebSocket = window.WebSocket;
- window.fakeWebSocket = function(){return {readyState: 0}};
- window._WebSocket = window.WebSocket = function(ip){return new window.fakeWebSocket(ip);};
- window.addEventListener("load",function(){
- console.log(' - HyperBots.cf | Status: ONLINE');
- console.log(' - Info | Time to rekt this game.');
- if(!window.OldSocket)
- OldSocket = window.__WebSocket;
- window._WebSocket = window.WebSocket = window.fakeWebSocket = function(ip){
- var ws = new OldSocket(ip);
- ws.binaryType = "arraybuffer";
- var fakeWS = {};
- for(var i in ws)
- fakeWS[i] = ws[i];
- fakeWS.send = function(){
- var msg = new DataView(arguments[0]);
- if(msg.byteLength==21){
- if(msg.getInt8(0, true) == 16){
- userCordinates.x = msg.getFloat64(1, true);
- userCordinates.y = msg.getFloat64(9, true);
- }
- } else {
- if(msg.byteLength==13){
- if(msg.getUint8(0, true) == 16){
- userCordinates.x = msg.getInt32(1, true);
- userCordinates.y = msg.getInt32(5, true);
- }else{
- if(msg.byteLength>4){
- if(msg.getUint8(0, true) == 16){
- userCordinates.x = msg.getInt16(1, true);
- userCordinates.y = msg.getInt16(3, true);
- }
- }
- }
- }
- }
- return ws.send.apply(ws, arguments);
- };
- ws.onmessage = function(){
- var msg = new DataView(arguments[0].data);
- if(msg.byteLength>16){
- if(msg.getUint8(0, true) == 64){
- userCordinates.ma = msg.getFloat64(1, true);
- userCordinates.mb = msg.getFloat64(9, true);
- }
- }
- fakeWS.onmessage && fakeWS.onmessage.apply(ws, arguments);
- };
- ws.onopen = function(){
- botInfo.serverURL = ws.url;
- fakeWS.readyState = 1;
- fakeWS.onopen.apply(ws, arguments);
- };
- ws.onclose = function(){
- fakeWS.onclose.apply(ws, arguments);
- };
- return fakeWS;
- };
- if(location.origin=="http://cellcraft.io"){
- connect("");
- }
- });
- $(document).ready(function() {
- if (!document.contains(document.getElementById('botMenu'))) {
- var element = document.createElement('div');
- element.id = 'botMenu';
- element.innerHTML = htmlToInject;
- document.body.appendChild(element);
- }
- });
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement