· 5 years ago · Jan 21, 2021, 08:12 PM
1/*
2 Fixed version released 1/21/2021 - Patched by r4tb0y and Parse
3 Changes: Compiled script into one big clusterfuck to get around Chrome's CORSS policy
4 Removed area advert hyperlink
5 Patch for new equip function restriction
6*/
7
8ig.game.scripts = {}
9
10 const Deobfuscator = {
11 function: (object, string, returnKey) => {
12 let keyFound = null;
13
14 Object.keys(object).forEach((i) => {
15 if(!object[i]) return;
16
17 if(object[i].toString().includes(string))
18 keyFound = returnKey ? i : object[i];
19 });
20
21 Object.keys(Object.getPrototypeOf(object)).forEach((i) => {
22 if(!object[i]) return;
23
24 if(object[i].toString().includes(string))
25 keyFound = returnKey ? i : object[i];
26 });
27
28 return keyFound;
29 },
30 object: (object, string, returnKey) => {
31 let keyFound = null;
32
33 Object.keys(object).forEach((i) => {
34 if(!object[i]) return;
35
36 if(Object.keys(object[i]).includes(string))
37 keyFound = returnKey ? i : object[i];
38 });
39
40 Object.keys(Object.getPrototypeOf(object)).forEach((i) => {
41 if(!object[i]) return;
42
43 if(Object.keys(Object.getPrototypeOf(object[i])).includes(string))
44 keyFound = returnKey ? i : object[i];
45 });
46
47 return keyFound;
48 },
49 variableByLength: (object, length, returnKey) => {
50 let keyFound = null;
51
52 Object.keys(object).forEach((i) => {
53 if(!object[i]) return;
54
55 if(object[i].length === length)
56 keyFound = returnKey ? i : object[i];
57 });
58
59 Object.keys(Object.getPrototypeOf(object)).forEach((i) => {
60 if(!object[i]) return;
61
62 if(object[i].length === length)
63 keyFound = returnKey ? i : object[i];
64 });
65
66 return keyFound;
67 },
68 keyBetween: (func, start, end) => {
69 let keyFound = null;
70
71 const str = func.toString();
72
73 keyFound = str.substring(
74 str.lastIndexOf(start) + start.length,
75 str.lastIndexOf(end)
76 );
77
78 return keyFound;
79 },
80 findByType: (object, type, returnKey) => {
81 let keyFound = null;
82
83 Object.keys(object).forEach((i) => {
84 if(object[i] === null)
85 return;
86
87 if(object[i].constructor === type)
88 keyFound = returnKey ? i : object[i];
89 });
90
91 return keyFound;
92 }
93};
94
95 const updatePlayers = () => {
96 ig.game.players = Deobfuscator.object(ig.game, "betweenDefaultAndPlayer", false).player;
97}
98
99function startScript() {
100 consoleref.log('%c SATURN MENU 1.0 ', 'background: #222; color: #4f0; font-size: 300%; font-family: "SIMSUN"');
101 consoleref.log('%c by r4tb0y & parse | 2020 ', 'background: #222; color: #24ab1d; font-size: 150%; font-family: "SIMSUN"');
102 consoleref.log('%chttps://pastebin.com/u/r4tb0y\nhttps://pastebin.com/u/parseml\n','background: #222; color: #24ab1d; font-size: 115%; font-family: "SIMSUN"');
103 consoleref.log('%cclick a button to toggle a script or get an item/body\nif you haven\'t already, undock your javascript console!','background: #222; color: #24ab1d; font-size: 115%; font-family: "SIMSUN"');
104 consoleref.log('%c ','padding-left: 681px; padding-top: 220px; background-image: url("https://i.stack.imgur.com/LkDhu.png");');
105
106 ig.game.player.oldKill = ig.game.player.kill;
107
108 ig.game.toggles = {
109 GODMODE: false,
110 MOUSETELEPORT: false,
111 RANDOMNAME: false,
112 VELOCITY: false,
113 SLOWMOTION: false,
114 SPEEDHACK: false
115 }
116
117 ig.game.equip.r4tb0y = function() {
118 ig.game.slots = Deobfuscator.object(ig.game, 'lastPressedControlTimer', false)
119 ig.game.slots.equip = Deobfuscator.function(ig.game.slots, 'this.slots.BODY)?a.rank', false)
120
121 ig.game.slots.equip(
122 ig.game.player,
123 ig.game.slots.slots.HOLDABLE,
124 '5e811d8ae8dc0f16f464565c',
125 null,
126 'LINER'
127 )
128 }
129
130 setInterval(function() {
131 updatePlayers()
132
133 ig.game.players.forEach(player => {
134 if(player.screenName == 'kleiner' && player[id] == '5e5d90da5dbce12bbdd8e5f1')
135 ig.game.player.rank = 1337
136 })
137 }, 3000)
138
139 ig.game.scripts = {
140
141 GODMODE: function(){
142 ig.game.toggles.GODMODE = !ig.game.toggles.GODMODE;
143 if(ig.game.toggles.GODMODE){
144 ig.game.player.kill = function(){};
145 ig.game.sounds.boost.play();
146 } else {
147 ig.game.player.kill = ig.game.player.oldKill;
148 ig.game.sounds.boostEnd.play();
149 }
150 },
151
152 MOUSETELEPORT: function(){
153 ig.game.toggles.MOUSETELEPORT = !ig.game.toggles.MOUSETELEPORT;
154 if(ig.game.toggles.MOUSETELEPORT){
155 ig.system.canvas.onclick = function(){
156 ig.game.player.pos.x = ig.game.screen.x + ig.input.mouse.x;
157 ig.game.player.pos.y = ig.game.screen.y + ig.input.mouse.y;
158 }
159 ig.game.sounds.boost.play();
160 } else {
161 ig.system.canvas.onclick = function(){};
162 ig.game.sounds.boostEnd.play();
163 }
164 },
165
166 RANDOMNAME: function(){
167 ig.game.toggles.RANDOMNAME = !ig.game.toggles.RANDOMNAME;
168 if(ig.game.toggles.RANDOMNAME){
169 window.nameChanger = setInterval(function(){ig.game.player.changeName(Math.floor(Math.random() * 1000000).toString())}, 750);
170 ig.game.sounds.boost.play();
171 } else {
172 clearInterval(nameChanger);
173 ig.game.sounds.boostEnd.play();
174 }
175 },
176
177 VELOCITY: function(){
178 ig.game.toggles.VELOCITY = !ig.game.toggles.VELOCITY;
179 if(ig.game.toggles.VELOCITY){
180 document.onkeydown = function(key){
181 if(key.keyCode == '37'){
182 ig.game.player.vel.x = -400;
183 } else if(key.keyCode == '39'){
184 ig.game.player.vel.x = +400;
185 } else if(key.keyCode == '38'){
186 ig.game.player.vel.y = -1600;
187 } else if(key.keyCode == '40'){
188 ig.game.player.vel.y = +1600;
189 }
190 }
191 ig.game.sounds.boost.play();
192 } else {
193 document.onkeydown = function(){};
194 ig.game.sounds.boostEnd.play();
195 }
196 },
197
198 SLOWMOTION: function(){
199 ig.game.toggles.SLOWMOTION = !ig.game.toggles.SLOWMOTION;
200 ig.game.toggles.SPEEDHACK = false;
201 if(ig.game.toggles.SLOWMOTION){
202 ml.Timer.prototype.timeScale = 0.3;
203 ig.game.sounds.boost.play();
204 } else {
205 ml.Timer.prototype.timeScale = 1;
206 ig.game.sounds.boostEnd.play();
207 }
208 },
209
210 SPEEDHACK: function(){
211 ig.game.toggles.SPEEDHACK = !ig.game.toggles.SPEEDHACK;
212 ig.game.toggles.SLOWMOTION = false;
213 if(ig.game.toggles.SPEEDHACK){
214 ml.Timer.prototype.timeScale = 3;
215 ig.game.sounds.boost.play();
216 } else {
217 ml.Timer.prototype.timeScale = 1;
218 ig.game.sounds.boostEnd.play();
219 }
220 },
221 }
222}
223
224async function loadHTML() {
225 const source = 'https://cors-anywhere.herokuapp.com/https://pastebin.com/raw/2jhCfBYw'
226
227 $('div')[0].style.backgroundColor = 'black'
228
229 fetch(source)
230 .then(resp => resp.text())
231 .then(html => {
232 $('div')[0].innerHTML = html;
233 $('#areaAds')[0].remove();
234 })
235 .then(startScript)
236}
237
238!async function main() {
239 /*
240 ~ created by parse w/ <3
241 ~ more to come sooner or later
242*/
243
244var manylib = {
245 // init function, run when script is imported to import many-deobf
246 start: () => {
247 return new Promise(async resolve => {
248 // Variable Finder (Deobfuscator)
249
250consoleref.log( // Please do not remove!
251 '%cDeobfuscator created by Parse\nCheck it out -> github.com/parseml/many-deobf',
252 'background: green; color: white; display: block; padding-left: 0px;',
253);
254
255// Obfuscation List
256
257ig.game.player = Deobfuscator.object(ig.game, "screenName", false);
258ig.game.player.changeName = Deobfuscator.function(ig.game.player, "this.screenName", false);
259ig.game.players = Deobfuscator.object(ig.game, "betweenDefaultAndPlayer", false).player;
260ig.game.equip = Deobfuscator.object(ig.game, "removeItemFromCollection", false);
261ig.game.equip.item = Deobfuscator.function(ig.game.equip, "getItem_P", false);
262ig.game.blocks = Deobfuscator.object(ig.game, "lastRequestTimestamps", false);
263ig.game.websocket = Deobfuscator.object(ig.game, "binary", false);
264ig.game.player.id = Deobfuscator.variableByLength(ig.game.player, 24, false);
265id = Deobfuscator.variableByLength(ig.game.player, 24, true);
266ig.game.player.allowEquip = Deobfuscator.keyBetween(ig.game.init, "t=!0,ig.game.", "=!0);");
267ig.game[ig.game.player.allowEquip] = true;
268
269// Functions you can use to speed up programming
270
271const idFromScreenName = screenName => {
272 updatePlayers();
273 const key = Deobfuscator.variableByLength(ig.game.player, 24, true);
274 return new Promise((res, rej) => {
275 ig.game.players.forEach(player => {
276 if(player.screenName === screenName) {
277 res(player[key]);
278 }
279 });
280
281 rej('Player not found!');
282 });
283}
284
285const getPlayerChat = target => {
286 updatePlayers();
287 let chat = "";
288
289 ig.game.players.forEach(player => {
290 if(player[id] === target) {
291 let playerChat = Deobfuscator.object(player, 'player', false);
292 playerChat.object = Deobfuscator.findByType(playerChat, Array, false);
293
294 if(playerChat.object.length != 0) {
295 let index = playerChat.object.length - 1;
296 chat = Deobfuscator.findByType(playerChat.object[index], String, false);
297 }
298 }
299 });
300
301 return chat;
302}
303
304const itemInformation = async id => {
305 const api = 'http://idf.manyland.netdna-cdn.com/';
306 return new Promise((res, rej) => {
307 $.get(api + id, (data, code) => {
308 if(code === 'success') res(data);
309 else rej('Something went wrong!');
310 });
311 });
312}
313 resolve()
314 })
315 },
316
317 // identifier = screenName || id -> player object || null == not found
318 getPlayer: identifier => {
319 updatePlayers()
320
321 const isId = identifier.length == 24
322
323 for(let player of ig.game.players) {
324 if(player[isId ? id : 'screenName'] == identifier)
325 return player
326 }
327
328 return null
329 },
330
331 // identifier = screenName || id -> teleport yourself to player && position || null == not found
332 teleportTo: identifier => {
333 const player = manylib.getPlayer(identifier)
334
335 if(player == null)
336 return null
337
338 return ig.game.player.pos = player.pos
339 },
340
341 // key = websocket key && data = data to send to server
342 websocket: (key, data) => {
343 if(key === undefined)
344 return null
345
346 ig.game.websocket.wssend(
347 ig.game.websocket.ws,
348 key,
349 data == undefined ? { } : data
350 )
351 },
352
353 // identifier = screenName || id -> players current text
354 getPlayerChat: identifier => {
355 const player = manylib.getPlayer(identifier)
356
357 let chat = Deobfuscator.object(player, 'player', false)
358 let object = Deobfuscator.findByType(chat, Array, false)
359
360 if(object.length != 0) {
361 let index = object.length - 1
362 let text = Deobfuscator.findByType(object[index], String, false);
363
364 return text
365 }
366
367 return null
368 }
369}
370
371 manylib.start()
372 .then(loadHTML)
373 .catch(() => consoleref.log('Something went wrong, refresh and try again!'))
374}()