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