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

message_1_1

This document is a userscript designed for the game 'starve.io', featuring various functionalities such as automated actions and unique number generation for timers. It includes settings for auto-feeding, crafting, and other gameplay enhancements. The script manipulates game objects and properties to improve user experience and gameplay efficiency.

Uploaded by

Octavian
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)
26 views

message_1_1

This document is a userscript designed for the game 'starve.io', featuring various functionalities such as automated actions and unique number generation for timers. It includes settings for auto-feeding, crafting, and other gameplay enhancements. The script manipulates game objects and properties to improve user experience and gameplay efficiency.

Uploaded by

Octavian
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/ 22

// ==UserScript==

// @name A sasuke privet


// @namespace http://tampermonkey.net/
// @version 2024-05-20
// @description try to take over the world!
// @author For kebab
// @match https://starve.io/*
// @run-at document-start
// @grant unsafeWindow
// ==/UserScript==

/* workerTimers */ ! function (e, t) { "object" == typeof exports && "undefined" !=


typeof module ? t(exports) : "function" == typeof define && define.amd ?
define(["exports"], t) : t((e = "undefined" != typeof globalThis ? globalThis : e
|| self).fastUniqueNumbers = {}) }(this, function (e) { "use strict"; var t, r =
void 0 === Number.MAX_SAFE_INTEGER ? 9007199254740991 : Number.MAX_SAFE_INTEGER, n
= new WeakMap, i = function (e, t) { return function (n) { var i = t.get(n), o =
void 0 === i ? n.size : i < 1073741824 ? i + 1 : 0; if (!n.has(o)) return e(n, o);
if (n.size < 536870912) { for (; n.has(o);) o = Math.floor(1073741824 *
Math.random()); return e(n, o) } if (n.size > r) throw new Error("Congratulations,
you created a collection of unique numbers which uses all available integers!");
for (; n.has(o);) o = Math.floor(Math.random() * r); return e(n, o) } }((t = n,
function (e, r) { return t.set(e, r), r }), n), o = function (e) { return function
(t) { var r = e(t); return t.add(r), r } }(i); e.addUniqueNumber = o,
e.generateUniqueNumber = i, Object.defineProperty(e, "__esModule", { value: !
0 }) }), function (e, t) { "object" == typeof exports && "undefined" != typeof
module ? t(exports, require("fast-unique-numbers")) : "function" == typeof define
&& define.amd ? define(["exports", "fast-unique-numbers"], t) : t((e =
"undefined" != typeof globalThis ? globalThis : e || self).workerTimersBroker = {},
e.fastUniqueNumbers) }(this, function (e, t) { "use strict"; e.load = function (e)
{ var r = new Map([[0, function () { }]]), n = new Map([[0, function () { }]]), i =
new Map, o = new Worker(e); o.addEventListener("message", function (e) { var t =
e.data; if (function (e) { return void 0 !== e.method && "call" === e.method }(t))
{ var o = t.params, a = o.timerId, s = o.timerType; if ("interval" === s) { var u =
r.get(a); if ("number" == typeof u) { var d = i.get(u); if (void 0 === d ||
d.timerId !== a || d.timerType !== s) throw new Error("The timer is in an undefined
state.") } else { if (void 0 === u) throw new Error("The timer is in an undefined
state."); u() } } else if ("timeout" === s) { var f = n.get(a); if ("number" ==
typeof f) { var l = i.get(f); if (void 0 === l || l.timerId !== a || l.timerType !
== s) throw new Error("The timer is in an undefined state.") } else { if (void 0
=== f) throw new Error("The timer is in an undefined state."); f(), n.delete(a) } }
} else { if (! function (e) { return null === e.error && "number" == typeof e.id }
(t)) { var m = t.error.message; throw new Error(m) } var c = t.id, p = i.get(c); if
(void 0 === p) throw new Error("The timer is in an undefined state."); var v =
p.timerId, h = p.timerType; i.delete(c), "interval" === h ? r.delete(v) :
n.delete(v) } }); return { clearInterval: function (e) { var n =
t.generateUniqueNumber(i); i.set(n, { timerId: e, timerType: "interval" }),
r.set(e, n), o.postMessage({ id: n, method: "clear", params: { timerId: e,
timerType: "interval" } }) }, clearTimeout: function (e) { var r =
t.generateUniqueNumber(i); i.set(r, { timerId: e, timerType: "timeout" }), n.set(e,
r), o.postMessage({ id: r, method: "clear", params: { timerId: e, timerType:
"timeout" } }) }, setInterval: function (e, n) { var i = t.generateUniqueNumber(r);
return r.set(i, function () { e(), "function" == typeof r.get(i) && o.postMessage({
id: null, method: "set", params: { delay: n, now: performance.now(), timerId: i,
timerType: "interval" } }) }), o.postMessage({ id: null, method: "set", params:
{ delay: n, now: performance.now(), timerId: i, timerType: "interval" } }), i },
setTimeout: function (e, r) { var i = t.generateUniqueNumber(n); return n.set(i,
e), o.postMessage({ id: null, method: "set", params: { delay: r, now:
performance.now(), timerId: i, timerType: "timeout" } }), i } } },
Object.defineProperty(e, "__esModule", { value: !0 }) }), function (e, t)
{ "object" == typeof exports && "undefined" != typeof module ? t(exports,
require("worker-timers-broker")) : "function" == typeof define && define.amd ?
define(["exports", "worker-timers-broker"], t) : t((e = "undefined" != typeof
globalThis ? globalThis : e || self).workerTimers = {}, e.workerTimersBroker) }
(this, function (e, t) { "use strict"; var r = null, n = function (e, t) { return
function () { if (null !== r) return r; var n = new Blob([t], { type:
"application/javascript; charset=utf-8" }), i = URL.createObjectURL(n); return (r =
e(i)).setTimeout(function () { return URL.revokeObjectURL(i) }, 0), r } }(t.load,
'(()=>{var e={67:(e,t,r)=>{var o,i;void 0===(i="function"==typeof(o=function(){"use
strict";var e=new Map,t=new Map,r=function(t){var r=e.get(t);if(void 0===r)throw
new Error(\'There is no interval scheduled with the given id
"\'.concat(t,\'".\'));clearTimeout(r),e.delete(t)},o=function(e){var
r=t.get(e);if(void 0===r)throw new Error(\'There is no timeout scheduled with the
given id "\'.concat(e,\'".\'));clearTimeout(r),t.delete(e)},i=function(e,t){var
r,o=performance.now();return{expected:o+(r=e-Math.max(0,o-
t)),remainingDelay:r}},n=function e(t,r,o,i){var n=performance.now();n>o?
postMessage({id:null,method:"call",params:
{timerId:r,timerType:i}}):t.set(r,setTimeout(e,o-n,t,r,o,i))},a=function(t,r,o){var
a=i(t,o),s=a.expected,d=a.remainingDelay;e.set(r,setTimeout(n,d,e,r,s,"interval"))}
,s=function(e,r,o){var
a=i(e,o),s=a.expected,d=a.remainingDelay;t.set(r,setTimeout(n,d,t,r,s,"timeout"))};
addEventListener("message",(function(e){var t=e.data;try{if("clear"===t.method){var
i=t.id,n=t.params,d=n.timerId,c=n.timerType;if("interval"===c)r(d),postMessage({err
or:null,id:i});else{if("timeout"!==c)throw new Error(\'The given type
"\'.concat(c,\'" is not
supported\'));o(d),postMessage({error:null,id:i})}}else{if("set"!==t.method)throw
new Error(\'The given method "\'.concat(t.method,\'" is not supported\'));var
u=t.params,l=u.delay,p=u.now,m=u.timerId,v=u.timerType;if("interval"===v)a(l,m,p);e
lse{if("timeout"!==v)throw new Error(\'The given type "\'.concat(v,\'" is not
supported\'));s(l,m,p)}}}catch(e){postMessage({error:
{message:e.message},id:t.id,result:null})}}))})?o.call(t,r,t,e):o)||
(e.exports=i)}},t={};function r(o){var i=t[o];if(void 0!==i)return i.exports;var
n=t[o]={exports:{}};return e[o](n,n.exports,r),n.exports}r.n=e=>{var
t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var o
in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!
0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use
strict";r(67)})()})();'); e.clearInterval = function (e) { return
n().clearInterval(e) }, e.clearTimeout = function (e) { return
n().clearTimeout(e) }, e.setInterval = function (e, t) { return n().setInterval(e,
t) }, e.setTimeout = function (e, t) { return n().setTimeout(e, t) },
Object.defineProperty(e, "__esModule", { value: !0 }) });

const packets = {
extPut: 9,
extTake: 1,
placeBuild: 15,
joinTotem: 38,
angle: 19,
attack: 24,
stopAttack: 36,
chestPut: 13,
chestTake: 27,
equip: 16,
recycle:20,
craft: 2,
};

const SandstormImage = new Image();


SandstormImage.src
="https://raw.githubusercontent.com/XmreLoux/images/main/sandstorm.png";
const BlizzardImage = new Image();
BlizzardImage.src
="https://raw.githubusercontent.com/XmreLoux/images/main/blizzard.png";
let PathfinderEnd = {
x: 49,
y: 31
}

let Settings = {
ColoredSpikes: {
enabled: true
},
AutoSpike: {
key: "Space",
enabled: false
},
AutoPutRed: {
key:"KeyV",
enabled:false,
},
AMB: {
enabled: false,
key: "KeyF",
a: null,
t: null,
},
AutoFeed: {
enabled: true
},
AutoCraft: {
enabled: false,
key:"KeyB"
},
AutoRecycle: {
enabled: false,
key:"KeyL"
},
AutoSteal: {
enabled: false,
key: "KeyQ",
draw:true
},
AutoTotem: {
enabled: false,
key: "KeyH"
},
ExtractorInfo: {
enabled: true
},
ExtractorSteal: {
enabled: false,
key: "KeyI"
},
ExtractorPut: {
enabled: false,
key: "KeyP"
},
}

let LAST_CRAFT;

let world;
let client;
let user;
let mouse
let _this;
let log = console.log
let LAST_RECYCLE

log(unsafeWindow)
let master = Symbol()

function hooks() {
Object.defineProperty(Object.prototype, "timeout", {
get() {
return this[master]
},
set(data) {
this[master] = data;
if (!client) {
client = this;
log(client);
unsafeWindow.client = client;
}
},
})
Object.defineProperty(Object.prototype, "IDLE", {
get() {
return this[master]
},
set(data) {
this[master] = data;
if (!mouse) {
mouse = this;
log(mouse);
unsafeWindow.mouse = mouse;
}
},
})
Object.defineProperty(Object.prototype, "opacity", {
get() {
this[master] = 0.5
return this[master]

},
set(data) {
this[master] = data;

},
})
Object.defineProperty(Screen.prototype, "width", {
get: function() {
return 3840;
},
set: function(v) {
this[master] = v;
}
});
Object.defineProperty(Screen.prototype, "height", {
get: function() {
return 2160;
},
set: function(v) {
this[master] = v;
}
});
Object.defineProperty(Object.prototype, "mode", {
get() {
return this[master]
},
set(data) {
this[master] = data;
if (!world) {
world = this;
log(world);
unsafeWindow.world = world;
}
},
})

Object.defineProperty(Object.prototype, "control", {
get() {
return this[master]
},
set(data) {
this[master] = data;
if (!user) {
user = this;
log(user);
unsafeWindow.user = user;
ads()
}
},
})
}
hooks()
//////////////////////////////////////////////////////////////////////////////

function send(data) {
let sock;
let counter = 0;

for (let prop1 in client) {


counter++;

if (counter === 1) {
sock = prop1;
break;
}
}

client[sock].send(JSON.stringify(data))
}
function unit() {
let units;
let counter = 0;

for (let prop1 in world) {


counter++;

if (counter === 5) {
// log("hooked team: " + "world." + prop1);
units = world[prop1];
break;
}
}
return units;

function myplayer(){
let fast_units;
let counter = 0;

let pid
let counter2= 0

for (let prop1 in user) {


counter2++;

if (counter2 === 18) {


// log("hooked pid: " + "user." + prop1);
pid = user[prop1];
break;
}
}

for (let prop1 in world) {


counter++;

if (counter === 6) {
// log("hooked team: " + "world." + prop1);
fast_units = world[prop1][pid];
break;
}
}
return fast_units;

}
function pid(obj) {
return obj.Δ ⵠ ΔΔ;
}

function chatxterm() {
if(document.getElementById("chat_block").style.display === 'inline-block' ||
document.getElementById("commandMainBox").style.display === 'inline-block'){
return true;
}else{
return false;
}
}
function gauges(){
let gauge;
let gauge2;
let counter = 0;

for (let prop1 in user) {


counter++;

if (counter === 30) {

// console.log("hooked" +prop1)

gauge = user[prop1];
let innerCounter = 0;

for (let prop2 in gauge) {


innerCounter++;
if (innerCounter === 3) {
// console.log(prop2);
gauge2 = gauge[prop2];
// console.log(gauge2);
}
}
break;
}
}
return gauge2;
}

function gauges2(){
let gauge;
let gauge2;
let counter = 0;

for (let prop1 in user) {


counter++;

if (counter === 30) {

// console.log("hooked" +prop1)

gauge = user[prop1];
let innerCounter = 0;

for (let prop2 in gauge) {


innerCounter++;
if (innerCounter === 2) {
// console.log(prop2);
gauge2 = gauge[prop2];
// console.log(gauge2);
}
}
break;
}
}
return gauge2;
}
function inventoryHas(id) {

let inv;
let inv2;
let counter = 0;

for (let prop1 in user) {


counter++;

if (counter === 35) {


inv = user[prop1];
let counter2 = 0;
for (let prop2 in inv) {
counter2++;
if (counter2 === 4) {
// console.log(prop2);
inv2 = inv[prop2];
// console.log(inv2);
}
}
break;
}
}

if (inv2[id] !== 0 && inv2[id] !== undefined) {


return [true, inv2[id]]
} else {
return [false, undefined]
}
}

function isAlive() {
let team;
let counter = 0;

for (let prop1 in user) {


counter++;

if (counter === 11) {


team = user[prop1];
break;
}
}

return team;
}
function AutoFeed() {
if (user.Δ ⵠ ᐃ
Δᐃ) {
const foodItems = [110, 117]
const bottle = 127;
if (user.ⵠ ⲆⲆ ⵠ.ᐃᐃ < 0.45 && client.ᐃᐃ ⵠⵠ.readyState === 1) {
for (const item of foodItems) {
if (inventoryHas(item)) {
client.ping();
client.ⵠⵠⵠⵠ ᐃ(item);
}
}
}
if(user.ⵠ ⲆⲆ ⵠ.ᐃᐃ ⵠ < 0.40){
if (inventoryHas(bottle)) {
client.ping();
client.ⵠⵠⵠⵠ ᐃ(bottle);
}
}
}
}
function getUserPosition() {

let camx;
let camy;
for (let prop1 in user) {
for (let prop2 in user[prop1]) {
switch (prop2) {
case "x":
//log("hooked camx: " + "user." + prop1 + "." + prop2);
camx = user[prop1][prop2];
break;
case "y":
//log("hooked camy: " + "user." + prop1 + "." + prop2);
camy = user[prop1][prop2];
break;
}
}
}
return [camx, camy]
}

function drawsp() {
let drawSpike = null;

if (drawSpike === null || drawSpike === "null") {


[5, 12, 13, 14, 20, 52, 10, 15, 16, 17, 21, 51, 45, 46, 47, 48, 49,
53].forEach((id) => {
if (unit()[id].length > 0) {
for (let e in unit()[id]) {
for (const k in unit()[id][e]) {
if (typeof unit()[id][e][k] === "function") {
if (unit()[id][e][k].toString().includes("width")) {
drawSpike = k;
break; // Exit the loop once the key is found
}
}
}
}
}
});
}
return drawSpike
}

unsafeWindow.sp = drawsp
function ads() {
let uwu = document.getElementById("preroll")
let uws = document.getElementById("trevda")
let style = document.createElement('style');
uwu.remove()
uws.remove()
style.innerHTML = '.grecaptcha-badge { visibility: hidden; }';

document.head.appendChild(style);
console.log(uwu + ":" + uws)
console.log("removed")
}

function autoBook() {

let craft;
let counter = 0;

for (let prop1 in client) {


counter++;
if (counter === 96) {
craft = prop1
log(prop1)
break;
}
}

client[craft] = (id) => {

LAST_CRAFT = id

send([packets.equip, 28])
send([packets.craft, id]);
return 1;
};
}

function autoputred() {

let mp = myplayer()

function getdist(a, b) {
return Math.sqrt(((b.x - a.x) * (b.x - a.x)) + ((b.y - a.y) * (b.y -
a.y)));
}

if (isAlive() === true && chatxterm() === false&& Settings.AutoPutRed.enabled) {


var chest = unit()[11];
for (let i = 0; i < chest.length; ++i) {
if (getdist(mp, chest[i]) <= 330) {

send([packets.chestPut,202,10,pid(chest[i]),chest[i].id])

}
}

}
function aimbot() {
requestAnimationFrame(aimbot);
function isAlly(id) {
let team;
let counter = 0;

for (let prop1 in user) {


counter++;

if (counter === 22) {


//console.log("hooked team: " + "user." + prop1);
team = user[prop1];
break;
}
}

switch (id) {
case user.id:
return true;
default:
if (Array.isArray(team)) {
return team.includes(id);
}
}
}

let myPlayer = myplayer();

function HoldWeapon(_, $) {
switch (_) {
case 34:
case 18:
case 33:
case 15:
case 14:
case 13:
case 12:
case 16:
case 17:
return 2;
case 57:
case 5:
case 6:
case 30:
case 62:
case 9:
case 0:
case 63:
case 19:
return 1;
case 64:
case 65:
case 66:
case 67:
case 68:
case 70:
case 69:
return 3;
case 94:
case 95:
case 96:
case 97:
case 98:
case 90:
case 99:
return 6;
case 45:
if ($) return 4;
case -1:
if ($) return 5;
}
return 0;
}

function calcAngle(_, $, o) {
return _ && $ ? (o ? Math.atan2($.r.y - _.r.y, $.r.x - _.r.x) : Math.atan2($.y
- _.y, $.x - _.x)) : null;
}

function EnemyToAttack(myPlayer, PlayerList) {


let nearest = null;
let distSqrd = -1;
let HoldingSpear = HoldWeapon(myPlayer.right, false) === 2 ? true : false;

for (var i = 0, obj = null, d = null; i < PlayerList.length; ++i) {


obj = PlayerList[i];
if (pid(obj) === pid(myPlayer) || isAlly(pid(obj))) continue; // Skip self
and allies
if (!isAlly(pid(obj)) && myPlayer.fly === obj.fly && !obj.ghost) {
d = (myPlayer.x - obj.x) ** 2 + (myPlayer.y - obj.y) ** 2;
if (HoldingSpear && d < 210) continue;
if (distSqrd === -1 || d < distSqrd) {
distSqrd = d;
nearest = obj;
}
}
}

if(Settings.AMB.enabled && Settings.AMB.a != null) {

mouse.ᐃᐃᐃ.x = getUserPosition()[0] + nearest.x;


mouse.ᐃᐃᐃ.y = getUserPosition()[1] + nearest.y;

return nearest;
}

function dist2dSQRT(p1, p2) {


if (p1 && p2) {
return Math.sqrt((p1.x - p2.x) ** 2 + (p1.y - p2.y) ** 2);
}
return null;
}

if (Settings.AMB.enabled && myPlayer && isAlive() === true) {


const weaponType = HoldWeapon(myPlayer.right, true);
let myRange;
switch (weaponType) {
case 1:
myRange = myPlayer.fly ? 196.8 : 157.6;
break;
case 2:
myRange = myPlayer.fly ? 291.8 : 227.6;
break;
case 3:
myRange = 620;
break;
case 4:
myRange = myPlayer.fly ? 140 : 125;
break;
case 5:
myRange = myPlayer.clothe == 85 || myPlayer.clothe == 83 ?
(myPlayer.fly ? 120.8 : 97.6) : null;
break;
default:
myRange = null;
break;
}
if (myRange) {
const Enemy = EnemyToAttack(myPlayer, unit()[0]);
if (Enemy) {
const RangeBetweenMeAndEnemy = dist2dSQRT(myPlayer, Enemy);
if (RangeBetweenMeAndEnemy <= myRange) {
Settings.AMB.a = calcAngle(myPlayer, Enemy, true);
Settings.AMB.t = Enemy;
const e = 2 * Math.PI;
const Angle255 = Math.floor((((Settings.AMB.a + e) % e) *
255) / e);

log(Angle255);
send([packets.angle, Angle255]);
if (Settings.AMB.a && RangeBetweenMeAndEnemy <= myRange - 22) {
send([packets.attack, Angle255]);
send([packets.stopAttack]);
}
} else {
Settings.AMB.a = null;
Settings.AMB.t = null;
}
} else {
Settings.AMB.a = null;
}
}
}
}

function autoCraft() {

let craftInterval;

function sendCraft() {
if (LAST_CRAFT !== undefined && gauges() < 0.60 && !window.AutoEatWait) {

window.AutoEatWait = true;
const foodItems = [110, 117]
for (const item of foodItems) {
if (inventoryHas(item)) {
send([packets.equip, item])
}
}
workerTimers.setTimeout(() => {
window.AutoEatWait = false;
}, 500);
} else {
send([packets.craft, LAST_CRAFT]);
}
}

document.addEventListener('keydown', function(event) {
if (event.code === Settings.AutoCraft.key) {
if (Settings.AutoCraft.enabled == false && chatxterm() === false) {
sendCraft();
craftInterval = workerTimers.setInterval(sendCraft, 20)
Settings.AutoCraft.enabled = true;
} else {
if (Settings.AutoCraft.enabled == true) {
workerTimers.clearInterval(craftInterval);
Settings.AutoCraft.enabled = false;
}
}
}
});

function autoRecycle() {

let RecycleInterval;

function sendRecycle() {
if (isAlive() === true && LAST_RECYCLE !== undefined && gauges() < 0.60
&& !window.AutoEatWait) {
window.AutoEatWait = true;
const foodItems = [110, 117]
for (const item of foodItems) {
if (inventoryHas(item)) {
send([packets.equip, item])
}
}
workerTimers.setTimeout(() => {
window.AutoEatWait = false;
}, 500);
} else {
send([packets.recycle, LAST_RECYCLE]);
}
}

document.addEventListener('keydown', function(event) {
if (event.code === Settings.AutoRecycle.key) {
if (Settings.AutoRecycle.enabled == false && chatxterm() === false) {
sendRecycle();
RecycleInterval = workerTimers.setInterval(sendRecycle, 20)
Settings.AutoRecycle.enabled = true;
} else {
if (Settings.AutoRecycle.enabled == true) {
workerTimers.clearInterval(RecycleInterval);
Settings.AutoRecycle.enabled = false;
}
}
}
});
}

function colors() {
if (isAlive() === true && Settings.ColoredSpikes.enabled) {
unsafeWindow.ReiditeSpikeAlly = new Image;
unsafeWindow.ReiditeSpikeAlly.src =
"https://raw.githubusercontent.com/sfagasdzdgfhs/spikes/main/day-reidite-spike-
ally.png"
unsafeWindow.AmethystSpikeAlly = new Image;
unsafeWindow.AmethystSpikeAlly.src =
"https://raw.githubusercontent.com/sfagasdzdgfhs/spikes/main/day-amethyst-spike-
ally.png"
unsafeWindow.DiamondSpikeAlly = new Image;
unsafeWindow.DiamondSpikeAlly.src =
"https://raw.githubusercontent.com/sfagasdzdgfhs/spikes/main/day-diamond-spike-
ally.png"
unsafeWindow.GoldSpikeAlly = new Image;
unsafeWindow.GoldSpikeAlly.src =
"https://raw.githubusercontent.com/sfagasdzdgfhs/spikes/main/day-gold-spike-
ally.png"
unsafeWindow.StoneSpikeAlly = new Image;
unsafeWindow.StoneSpikeAlly.src =
"https://raw.githubusercontent.com/sfagasdzdgfhs/spikes/main/day-stone-spike-
ally.png"
unsafeWindow.WoodSpikeAlly = new Image;
unsafeWindow.WoodSpikeAlly.src =
"https://raw.githubusercontent.com/sfagasdzdgfhs/spikes/main/day-wood-spike-
ally.png"

unsafeWindow.ReiditeSpikeEnemy = new Image;


unsafeWindow.ReiditeSpikeEnemy.src =
"https://raw.githubusercontent.com/sfagasdzdgfhs/spikes/main/day-reidite-spike-
enemy.png"
unsafeWindow.AmethystSpikeEnemy = new Image;
unsafeWindow.AmethystSpikeEnemy.src =
"https://raw.githubusercontent.com/sfagasdzdgfhs/spikes/main/day-amethyst-spike-
enemy.png"
unsafeWindow.DiamondSpikeEnemy = new Image;
unsafeWindow.DiamondSpikeEnemy.src =
"https://raw.githubusercontent.com/sfagasdzdgfhs/spikes/main/day-diamond-spike-
enemy.png"
unsafeWindow.GoldSpikeEnemy = new Image;
unsafeWindow.GoldSpikeEnemy.src =
"https://raw.githubusercontent.com/sfagasdzdgfhs/spikes/main/day-gold-spike-
enemy.png"
unsafeWindow.StoneSpikeEnemy = new Image;
unsafeWindow.StoneSpikeEnemy.src =
"https://raw.githubusercontent.com/sfagasdzdgfhs/spikes/main/day-stone-spike-
enemy.png"
unsafeWindow.WoodSpikeEnemy = new Image;
unsafeWindow.WoodSpikeEnemy.src =
"https://raw.githubusercontent.com/sfagasdzdgfhs/spikes/main/day-wood-spike-
enemy.png"

let ITEMS = {
SPIKE: 5,
STONE_SPIKE: 12,
GOLD_SPIKE: 13,
DIAMOND_SPIKE: 14,
AMETHYST_SPIKE: 20,
REIDITE_SPIKE: 52,
}

unsafeWindow.ITEMS_TO_CHECK = {
SPIKE: 5,
STONE_SPIKE: 12,
GOLD_SPIKE: 13,
DIAMOND_SPIKE: 14,
AMETHYST_SPIKE: 20,
REIDITE_SPIKE: 52,
}
let chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMOPQRSTUVWXYZ_0123456789";

for (let e in unsafeWindow) {


if (!Array.isArray(unsafeWindow[e]) && chars.includes(e[0])) continue;
if (unsafeWindow[e].length > 800 && unsafeWindow[e].length < 1500)
unsafeWindow.sprite = unsafeWindow[e];
}
sprite[10000] = [WoodSpikeAlly, WoodSpikeAlly];
sprite[10001] = [WoodSpikeEnemy, WoodSpikeEnemy];

sprite[10002] = [StoneSpikeAlly, StoneSpikeAlly];


sprite[10003] = [StoneSpikeEnemy, StoneSpikeEnemy];

sprite[10004] = [GoldSpikeAlly, GoldSpikeAlly];


sprite[10005] = [GoldSpikeEnemy, GoldSpikeEnemy];

sprite[10006] = [DiamondSpikeAlly, DiamondSpikeAlly];


sprite[10007] = [DiamondSpikeEnemy, DiamondSpikeEnemy];

sprite[10008] = [AmethystSpikeAlly, AmethystSpikeAlly];


sprite[10009] = [AmethystSpikeEnemy, AmethystSpikeEnemy];

sprite[10010] = [ReiditeSpikeAlly, ReiditeSpikeAlly];


sprite[10011] = [ReiditeSpikeEnemy, ReiditeSpikeEnemy];

function isAlly(id) {
switch (id) {
case user.id:
return true;
default:
return user.ⵠ ΔΔΔΔ.includes(id);
}
}
let push = Array.prototype.push
Array.prototype.push = function(p) {
if (p) {
let a = Object.keys(p);
5 == a.length && a.includes("draw") && a.includes("in_button") &&
32 !== p.id && 130 !== p.id && 127 !== p.id && 4 !== p.id && 25 !== p.id && 34 !==
p.id && 87 !== p.id && (unsafeWindow.inventory = this);
}
unsafeWindow.wow = 'Δ ⵠ ⲆⲆ'
if (p && null != p.type && null != p.id && p.x && p.y)
switch ((0 === p.type && pid(p) === unsafeWindow.playerID &&
(unsafeWindow.player = p), p.type)) {

case ITEMS.SPIKE: {
p.ally = unsafeWindow.playerID === pid(p) ||
isAlly(pid(p));
let l = p[wow]; // draw
p[wow] = function(a) {
return Settings.ColoredSpikes ? (p.ally ? l.apply(this,
[1e4]) : l.apply(this, [10001])) : l.apply(this, arguments);
};
break;
}
case ITEMS.STONE_SPIKE: {
p.ally = unsafeWindow.playerID === pid(p) ||
isAlly(pid(p));
let i = p[wow]; // draw
p[wow] = function(a) {
return Settings.ColoredSpikes ? (p.ally ? i.apply(this,
[10002]) : i.apply(this, [10003])) : i.apply(this, arguments);
};
break;
}
case ITEMS.GOLD_SPIKE: {
p.ally = unsafeWindow.playerID === pid(p) ||
isAlly(pid(p));
let e = p[wow]; // draw
p[wow] = function(a) {
return Settings.ColoredSpikes ? (p.ally ? e.apply(this,
[10004]) : e.apply(this, [10005])) : e.apply(this, arguments);
};
break;
}
case ITEMS.DIAMOND_SPIKE: {
p.ally = unsafeWindow.playerID === pid(p) ||
isAlly(pid(p));
let t = p[wow]; // draw
p[wow] = function(a) {
return Settings.ColoredSpikes ? (p.ally ? t.apply(this,
[10006]) : t.apply(this, [10007])) : t.apply(this, arguments);
};
break;
}
case ITEMS.AMETHYST_SPIKE: {
p.ally = unsafeWindow.playerID === pid(p) ||
isAlly(pid(p));
let r = p[wow]; // draw
p[wow] = function(a) {
return Settings.ColoredSpikes ? (p.ally ? r.apply(this,
[10008]) : r.apply(this, [10009])) : r.apply(this, arguments);
};
break;
}
case ITEMS.REIDITE_SPIKE: {
p.ally = unsafeWindow.playerID === pid(p) ||
isAlly(pid(p));
let y = p[wow]; // draw
p[wow] = function(a) {
return Settings.ColoredSpikes ? (p.ally ? y.apply(this,
[10010]) : y.apply(this, [10011])) : y.apply(this, arguments);
};
break;
}
case unit()[0]: {
console.log(p)
let w = p[wow]
console.log(w)
}
}
return push.apply(this, arguments);
};
}
}
function Visuals() {
requestAnimationFrame(Visuals);
try {
window.ctx = document.getElementById("game_canvas").getContext("2d");
} catch (error) {
return;
}

let i = 22.5;
for (hack in Settings) {
if (Settings[hack].enabled && Settings[hack].key) {
ctx.save();
ctx.beginPath();
ctx.lineWidth = 6;
ctx.fillStyle = "red";
ctx.strokeStyle = "black";
ctx.font = "22px Baloo Paaji";
ctx.strokeText(hack, 3, i);
ctx.fillText(hack, 3, i);
ctx.restore();
i += 22.5;
}
}
}
function extractorsInfo() {

const ctx = document.querySelector("canvas").getContext("2d");

function extractors_engine() {
requestAnimationFrame(extractors_engine);
const mp = myplayer()

function extractor_info() {
const extractor_ids = [24, 25, 26, 27, 28];
for (let i = 0; i < extractor_ids.length; ++i) {
const spikeType = extractor_ids[i];
const extractors = unit()[spikeType];
if (isAlive() === true) {
for (let j = 0; j < extractors.length; j++) {
const extractor = extractors[j];
ctx.save();
ctx.lineWidth = 8;
ctx.font = "26px Baloo Paaji";
ctx.strokeStyle = "#000";
ctx.fillStyle = (extractor.info & 0xFF) > 0 ? "lime" :
"white";
ctx.strokeText(`${extractor.info & 0xFF}`, (extractor.x -
20) + getUserPosition()[0], extractor.y + getUserPosition()[1]);
ctx.fillText(`${extractor.info & 0xFF}`, (extractor.x - 20)
+ getUserPosition()[0], extractor.y + getUserPosition()[1]);
ctx.restore();
}

for (let j = 0; j < extractors.length; ++j) {


const extractor = extractors[j];
ctx.save();
ctx.lineWidth = 8;
ctx.font = "26px Baloo Paaji";
ctx.strokeStyle = "#000";
ctx.fillStyle = (extractor.info >> 8) > 0 ? "yellow" :
"white";
ctx.strokeText(`${(extractor.info & 0xFF00) >> 8}`,
(extractor.x - 20) + getUserPosition()[0], (extractor.y + 20) + getUserPosition()
[1]);
ctx.fillText(`${(extractor.info & 0xFF00) >> 8}`,
(extractor.x - 20) + getUserPosition()[0], (extractor.y + 20) + getUserPosition()
[1]);
ctx.restore();
}
}
}
}

extractor_info();

}
extractors_engine();
}

function tot() {

function getdist(a, b) {
return Math.sqrt(((b.x - a.x) * (b.x - a.x)) + ((b.y - a.y) * (b.y -
a.y)));
}

const mp = myplayer()

const ctx = document.querySelector("canvas").getContext("2d");

requestAnimationFrame(tot);

const totem = unit()[29]


if (totem === undefined || totem.length === undefined || totem.length === 0) {
return;
};

function totinfo() {
for (let i = 0; i < totem.length; ++i) {
const {
x,
y,
info
} = totem[i];
let totw = unit()[29][i]
ctx.save();
ctx.lineWidth = 8;
ctx.font = "26px Baloo Paaji";
ctx.strokeStyle = "#000";
ctx.fillStyle = totw.info >= 16 ? "red" : "lime";;

ctx.strokeText(info >= 16 ? "🔒" : "🔓", (x - 20) + getUserPosition()[0],


y + getUserPosition()[1]);
ctx.fillText(info >= 16 ? "🔒" : "🔓", (x - 20) + getUserPosition()[0], y
+ getUserPosition()[1]);

const infoText = totw.info >= 16 ? "People in totem: " + totw.info % 16


: "People in totem: " + totw.info;
ctx.font = '16px Baloo Paaji';
ctx.strokeStyle = 'black';
ctx.fillStyle = "white";
ctx.fillText(infoText, (totw.x - 20) + getUserPosition()[0], totw.y +
getUserPosition()[1] - 30);
ctx.restore();

ctx.restore();
}

}
if (isAlive() === true && chatxterm() === false&& autototem) {
for (let i = 0; i < totem.length; ++i) {
if (getdist(mp, totem[i]) <= 300) {
send([packets.joinTotem, pid(totem[i]), totem[i].id])

}
}
}

totinfo();

let readys = {
AutoSpike: true,
AutoWall: true,
AutoCraft: true,
};

function auto() {
if (chatxterm() === false) {
let spikeToPlace = undefined;

if (inventoryHas(219)[0]) {
spikeToPlace = 219;
log("invhas: reidite spike");
} else if (inventoryHas(123)[0]) {
spikeToPlace = 123;
log("invhas: ame spike");
} else if (inventoryHas(170)[0]) {
spikeToPlace = 170;
log("invhas: dia spike");
} else if (inventoryHas(169)[0]) {
spikeToPlace = 169;
log("invhas: gold spike");
} else if (inventoryHas(168)[0]) {
spikeToPlace = 168;
log("invhas: stone spike");
} else if (inventoryHas(162)[0]) {
spikeToPlace = 162;
log("invhas: wall");
} else if (inventoryHas(113)[0]) {
spikeToPlace = 113;
log("invhas: wall");
}

if (Settings.AutoSpike.enabled && isAlive() === true && spikeToPlace !==


undefined && readys.AutoSpike) {
readys.AutoSpike = false;
setTimeout((e) => (readys.AutoSpike = true), 100);

let pi2 = Math.PI * 2;


let p = myplayer()
let angle = p.angle
window.wp = p
let i = Math.floor((((angle + pi2) % pi2) * 255) / pi2)

send([packets.placeBuild, spikeToPlace, i, 0]);


for (let inddex = 10; inddex < 30; inddex += 3) {
send([packets.placeBuild, spikeToPlace, (-inddex + i)
% 255, 0]);
send([packets.placeBuild, spikeToPlace, (inddex + i)
% 255, 0]);
}

}
}
}

let autoputredsinterval
let autoputreds = false

let placeSpikesInterval;
let pressed = false;

let autototemInterval;
let autototem = false;

let autoextractortakeInterval;
let autoextractortake = false;

let autoextractorputInterval;
let autoextractorput = false;

let awutostealInterval;
let awutosteal = false;

document.addEventListener("keydown", (e) => {


switch (chatxterm() === false && e.code) {
case Settings.AutoSpike.key:
Settings.AutoSpike.enabled = true;
break;
}
});

document.addEventListener("keyup", (e) => {


switch (chatxterm() === false && e.code) {
case Settings.AutoSpike.key:
Settings.AutoSpike.enabled = false;
break;
}
});

function main() {
Visuals()
autoCraft()
autoBook()
autoRecycle()
tot()
workerTimers.setInterval(AutoFeed, 600);
colors()
}

let ready_ = 0;

function initialize() {
try {
if (ready_ === 0 && user !== undefined && world !== undefined && client !==
undefined) {
main()
setInterval(auto, 80)
log("On");
ready_++;
}
} catch (err) {
log("Off");
log(err)
}
}

setInterval(initialize, 200);

You might also like