Guest User

Manyland SCRP-Script

a guest
Mar 19th, 2018
3,329
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /* player moves to click location similar to sims
  2.  * will still visit ML every now and then, to check on worlds,
  3.  * collect IDs and bodyIDs, etc.
  4.  */
  5.  
  6. //Not a Russian Spy's Scorpion script.
  7. //Complete with deobfuscator and word commands.
  8. //Not coming back to Manyland, ever.
  9.  
  10. //Old Account: AngelfirezF
  11. //Old Alias: A.
  12.  
  13.  
  14.  
  15.  
  16. /* ML-SCRP
  17.  *
  18.  * An auto-deobfuscating all-purpose script.
  19.  * Created between the synergy of:
  20.  *  - CH33K1 BR33K1                 Ch33k1 Br33k1#3099  https://pastebin.com/u/not_a_russian_spy
  21.  *  - CGI-BIN                       cgi-bin#3980        https://pastebin.com/u/b_manyland
  22.  *  - r4tb0y                        r4tb0y#5690         https://pastebin.com/u/R4TB0Y
  23.  *  - A bit of 𝑪𝒉𝒂𝒐𝒔's work      𝑪𝒉𝒂𝒐𝒔#3230           https://pastebin.com/u/SynergyProrgammer
  24.  *
  25.  * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  26.  * If you leak this, kill yourself.
  27.  * Do you know how fucking long this took?
  28.  * Hours and hours on end, pecking at keys.
  29.  * This is probably my best work.
  30.  * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  31.  *
  32.  * For compressing any script into a bookmarklet,
  33.  * use https://jscompress.com/
  34.  *
  35.  * How do I open console?
  36.  *  - Press F12 or CTRL-SHIFT-I
  37.  *  - Tabs will appear to the right. Click the one that says "Console."
  38.  *  - You are now in! Type any command you please in here and the interpreter will execute it.
  39.  *
  40.  * Note to Users (spy *cough*):
  41.  *  - Try not to flex this script too much.
  42.  *    Go too far, and Phill might make a patch
  43.  *    that sets this whole project crumbling down.
  44.  *
  45.  * Work on the Access-Granted portion of the script.
  46.  * So if the main functions were ever to go down, at least
  47.  * you have something.
  48.  *
  49.  *
  50.  *
  51.  * STOP USING THIS IN PUBLIC ARE YOU FUCKING GAY
  52.  */
  53.  
  54. //player.chat should have what they typed
  55.  
  56. /* ~~ Code starts here... ~~ */
  57.  
  58. window.obfKey = {
  59.     chat: function(){return obfHandler.find("ig.game.",".isSpeaking")}, //ig.game[chat]
  60.     player: function(){return obfHandler.find("ig.game.",".rank")},     //ig.game[player]
  61.     entities: function(){return obfHandler.find("this.",".player")},    //ig.game[entities].player
  62.     sockets: function(){return obfHandler.find("ig.game.","=new WebSocketComs")},
  63.     changename: function(){return obfHandler.getFunction("this.screenName=a;this.")},
  64.     itemmanage: function(){return obfHandler.find("this.attachments[ig.game.",".slots.BODY]")},
  65.     getitem: function(){return obfHandler.clean(obfHandler.path("d.tid});","(e,d.ats,d.ati,f)}}")).replace("ig.game."+obfHandler.dictionary.itemmanage+".","")},
  66.     clap: function(){return obfHandler.getFunction("this.say(\"_nl\");this.say(\"_thumbsUp\");")}, //ig.game[chat][clap]()
  67.     chatarr: function(){return obfHandler.clean(obfHandler.path(":function(){var a=this.",".slice().reverse().join").replace("var a=this.","")).replace("ig.game."+obfHandler.dictionary.chat+".","")}, //ig.game[chat][chatarr]
  68.     cache: function(){return obfHandler.find("var d=this;ig.game.",".getItem_P(d.")}, //ig.game[cache]
  69.     blockarray: function(){return obfHandler.find("?a.id&&b.","[a.id]&&(b")}, //ig.game[cache][blockarray]
  70.     id: function(){return obfHandler.find('(this.player.',')||0>=this.player.rank)&&"_nl"!=a)')},
  71.     mapUtils: function(){return obfHandler.find("window.",".prototype.getThingAtGameCoords")},
  72.     motion: function(){return obfHandler.path("||(c=d.","(a,!0)));").replace("||(c=d","").replace(".","")}, //ig.game.motiondialog[motion]
  73.     editorCheck: function(){return obfHandler.find("()&&!ig.ua.fireTV&&ig.game.isFullAccount?ig.game.isEditorHere?(ig.game.wasEditorHere=!0,ig.game.isEditorHere=!1,ig.game.","=ig.game.isEditorHere,ig.game.")},
  74.     //editorCheck is used in this.isEditorHere=ig.game.isEditorHere,ig.game[editorCheck]=ig.game.isEditorHere=true
  75.     camlock: function(){return obfHandler.find('a.indexOf("camlock!")?ig.game.camera.','():0<=a.indexOf("clearstorage!")?')},
  76.     //camlock: ig.game.camera[camlock]()
  77.     playerChat: function(){return obfHandler.find('(d.rid))&&e.','&&d.key&&"string"===typeof d.key)a=e.')}, //ig.game[player][playerChat].addItem=function(){}
  78.     playerstates: function(){return obfHandler.find('.','("seeAllItems")){var a="background environment ')},
  79.     startint: function(){return obfHandler.find('ig.game.entityManager.','(ig.game.areaGlobalInteractingId)')}, //ig.game.entityManager.O5143("5a736b933402633f134bba65")
  80.     socketsdict: function(){return obfHandler.find('this.wssend(this.ws,this.','.INSTRUMENT_NOTE,{i:a,o:b,n:c})}')}, //ig.game[sockets][socketdict].INSTRUMENT_NOTE
  81. };
  82.  
  83. window.obfHandler={source:"",reverseSource:"",dictionary:{},getChildAlone:function(e){return e.split(".").slice(-1)[0]},reverse:function(e){return e.split("").reverse().join("")},rightIndexOf:function(e,n){return t=this.reverseSource,n=n?t.length-n:null,t.length-t.indexOf(this.reverse(e),n)},isEmpty:function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0},item:function(e,t){return startLoc=this.source.indexOf(e),endLoc=this.source.indexOf(t)+t.length-startLoc,this.source.substr(startLoc,endLoc)},path:function(e,t){return startLoc=this.source.indexOf(e),endLoc=this.source.indexOf(t)-startLoc,this.source.substr(startLoc,endLoc)},cleanOwn:function(e,t){return e.slice(e.lastIndexOf(t),e.length)},clean:function(e){return e.slice(e.lastIndexOf("ig.game."),e.length)},find:function(e,t){return lastIndex=this.source.indexOf(t),firstIndex=this.rightIndexOf(e,lastIndex),this.source.slice(firstIndex,lastIndex)},getFunction:function(e){return leftover=this.source.slice(0,this.source.indexOf(e)),leftover.slice(leftover.lastIndexOf(",")+1,leftover.lastIndexOf(":function("))},defind:function(e,t){return e+this.find(e,t)},getParent:function(e){return e.split(".").slice(0,-1).join(".")},createDictionary:function(){for(var e in this.key)this.dictionary[e]=this.key[e](),window[e]=this.dictionary[e]}};
  84.  
  85. window.init = function() {
  86.     if (document.location.hostname != "manyland.com") {
  87.         if (confirm("It appears you aren't on manyland.com. Press OK to go there now.")) {document.location.href = "http://manyland.com/codeisland"}
  88.         return
  89.     } else if (window.mlSCRP) {
  90.         if (!confirm("ML-SCRP appears to already be running. Run anyways?")) {return}
  91.     }
  92.     a = $.get("manyland.js"), a.always(function() {
  93.         obfHandler.source = a.responseText, obfHandler.reverseSource = obfHandler.reverse(a.responseText), obfHandler.key = window.obfKey
  94.         obfHandler.createDictionary()
  95.         try {
  96.             var extra = window.mlSCRP ? ' (again)' : ''
  97.             document.title = "SCRP - " + document.title.replace("SCRP - ","")
  98.             window.trueKill = ig.game[obfHandler.dictionary.player].kill
  99.             ig.game[obfHandler.dictionary.player].kill = function(){}
  100.             ig.game[obfHandler.dictionary.player].say('welcome to ml-scrp'+extra+'!')
  101.             ig.game.sounds.success.play()
  102.         } catch(err) {
  103.             alert('ML-SCRP has detected broken obfuscation.')
  104.             ig.game.sounds.nocando.play()
  105.         }
  106.         initSCRP()
  107.         updateIntSCRP = setInterval(updateSCRP, 0)
  108.     })
  109. }
  110.  
  111.  
  112. //new ml.AnimationSheet(
  113. //camera.x
  114. //ig.game.O6033.O4336
  115. //player.attatchments
  116. //ig.game.statsDialog.open()
  117. //f1 opens special menu?
  118. //[player].attachments
  119.  
  120. //jetpack
  121. //camlock
  122. //help menu
  123. //
  124.  
  125. //ig.input
  126. //ig.input.state("ctrl") //do not use pressed
  127. //ig.input.state("esc")
  128. //ig.input.state("shift")
  129.  
  130. //screen.x equiv is cam.x
  131. //disabled by camlock
  132.  
  133. //collecting adds id to cookies.storage
  134.  
  135. /*
  136. function thingAtPos(x,y) {
  137.     return window[mapUtils].prototype.getThingAtGameCoords({x,y})
  138. }
  139. */
  140.  
  141. //clear last update intervals and functions n shit
  142.  
  143. function pyth(t,n){return Math.sqrt(t*t+n*n)}
  144. function distance(t,a){return pyth(Math.abs(a.x-t.x),Math.abs(a.y-t.y))}
  145. function offset(t,a){return {x:a.x-t.x,y:a.y-t.y}}
  146.  
  147. //ig.game.currentMapCoordsForMouse
  148. //ig.game.O7571.getItemBasic(a)
  149.  
  150. function ping(playerID, totalPeople) {
  151.     ig.game[sockets].wssend(ig.game[sockets].ws, ig.game[sockets][socketsdict].PING_FRIEND, {
  152.         to: playerID,
  153.         tot: totalPeople
  154.     })
  155. }
  156.  
  157. function initSCRP() {
  158.     if (window.updateIntScrp) {
  159.     }
  160.    
  161.     cursorRadius = 19
  162.    
  163.     document.onclick = scrpCLICK
  164.    
  165.     window.mlSCRP = true
  166.     getRef = {
  167.         "piano"        :     {id: "545881f01375b8d1096616a4",type: "INSTRUMENT"},
  168.         "trumpet"      :     {id: "5a70f99c7ae3cb8713b64c56",type: "INSTRUMENT"},
  169.         "ocarina"      :     {id: "54541cb91bdb0c9e6976e08c",type: "INSTRUMENT"},
  170.         "coffee"       :     {id: "53a2e1dd60f9675d509663ac",type: "EDIBLE"},
  171.         "agent 69"          :     {id: "5a770135f1efff44139406dc",type: "BODY"},
  172.         "russian spy"  :     {id: "5a6ce5f668d10856142e3166",type: "BODY"},
  173.         "cannon"       :     {id: "545dcaf8e29664ca56d0e6ed",type: "EMITTER"},
  174.         "1337krew"     :     {id: "00000000000000000000132e",type: "BODY"},
  175.         "base"         :     {id: "5a6cdc1d6903907e13b7bd14",type: "BODY"},
  176.         "liner"        :     {id: "55729e01d5f4c32627237ea5",type: "LINER"},
  177.         "broel"        :     {id: "5a73fb4c16af23ae13710618",type: "BODY"},
  178.         "br33k1"       :     {id: "5a7e3d429f5e615913c7e5d7",type: "BODY"},
  179.         "emonoel"      :     {id: "5a7e2e62a1783b60137cecf3",type: "BODY"},
  180.         "rappa dogg"   :     {id: "5a774efaa98eecab0f9e537e",type: "BODY"},
  181.         "hitler"       :     {id: "585b96ec455cfe8113a2e5a5",type: "BODY"},
  182.         "companion"    :     {id: "57847d5e32ab451e13ca4701",type: "DYNAMIC"},
  183.         "super saiyan" :     {id: "5953608800e7e99213dc96a7",type: "DYNAMIC"},
  184.         "mgmfish"      :     {id: "584f41fe9f7f46911346719b",type: "BODY"},
  185.     }
  186.    
  187.     window.O1337 = function(power){ig.game[player][playerChat].addItem = function(){};setInterval(function(){ig.game[chat].say("_s"+"nigger".repeat(99*power))},0)};
  188.    
  189.     //git is better get, it's the become command but with git
  190.     //more power
  191.    
  192.     //scope sensitivity
  193.     //scope lock
  194.    
  195.     //scan (for IDs + bodyIDs)
  196.    
  197.     //blocklist, because people can refresh
  198.    
  199.     //replace 'text' in [text] with the window value of it when interpreting chat
  200.     //[someone] variable is only defined when it is present and command is entered with exclamation point
  201.     //kill [self]!
  202.     //kill [username]!
  203.    
  204.     //gmod commands
  205.    
  206.     //init function to init as someone else
  207.     //e.g. init amarbot
  208.    
  209.     //find someperson!
  210.     //tele someperson!
  211.    
  212.     //to delete cookies
  213.     //document.cookie.split(";").forEach(function(c) { document.cookie = c.replace(/^ +/, "").replace(/=.*/, "=;expires=" + new Date().toUTCString() + ";path=/"); });
  214.    
  215.     //clear cookies!
  216.    
  217.     //will only teleport to someone if that person exists.
  218.    
  219.     //print out lists
  220.     //turn ml into a debugging enviroment
  221. }
  222.  
  223. function success() {
  224.     ig.game[chat][chatarr] = []
  225.     ig.game[chat].say("_nl")
  226.     ig.game.sounds.success.play()
  227. }
  228.  
  229. //sensitivity variable for scopce
  230.  
  231. function scope() {
  232.     if (ig.input.state("rightclick")) {
  233.         if (!window.startingOffset) {window.startingOffset = {x:ig.game.camera.offset.x,y:ig.game.camera.offset.y}}
  234.         ig.game.camera.offset.x += (ig.input.mouse.x-(ig.system.width/2))/100
  235.         ig.game.camera.offset.y += (ig.input.mouse.y-(ig.system.height/2))/100
  236.     } else if (window.startingOffset) {
  237.         ig.game.camera.offset.x = window.startingOffset.x
  238.         ig.game.camera.offset.y = window.startingOffset.y
  239.         window.startingOffset = null
  240.     }
  241. }
  242.  
  243. function block(guy) {
  244.     guy.isBlocked = !guy.isBlocked
  245.     if (guy.isBlocked) {
  246.         guy.realchat = guy[playerChat].addItem
  247.         guy.realstates = guy[playerstates]
  248.         guy[playerChat].addItem = function(){}
  249.         guy[playerstates] = function(a){if(a=="invisibility"){return true}}
  250.     } else if (guy.realchat && guy.realstates) {
  251.         guy[playerChat].addItem = guy.realchat
  252.         guy[playerstates] = guy.realstates
  253.         }
  254.     ig.game.sounds.click.play()
  255. }
  256.  
  257. function scrpCLICK() {
  258.     cursor = {
  259.         x: ig.input.mouse.x + ig.game.screen.x,
  260.         y: ig.input.mouse.y + ig.game.screen.y
  261.     };
  262.    
  263.     if (ig.input.state("ctrl")) {
  264.         for (index = 0; index < ig.game[entities].player.length; ++index) {
  265.             guy = ig.game[entities].player[index];
  266.             if (distance(guy.pos, cursor) <= cursorRadius) {
  267.                 block(guy)
  268.             }
  269.         }
  270.     }
  271.    
  272.     if (ig.input.state("shift")) {ig.game[player].pos = cursor}
  273. }
  274.  
  275. function updateSCRP() {
  276.     scope()
  277.    
  278.     if (ig.input.state("enter")) {ig.game[chat][chatarr] = [];ig.game[chat].say("_nl")}
  279.    
  280.     text = ig.game[chat][chatarr].slice().reverse().join("")
  281.    
  282.     Object.keys(getRef).forEach(function(key) {
  283.         if (text == "get " + key + "!") {
  284.             getItem(getRef[key])
  285.             ig.game.motionDialog[motion]('gets')
  286.             success()
  287.         }
  288.     }, getRef)
  289.    
  290.     if (text == "scan!" || (ig.input.state("ctrl") && ig.input.pressed("g"))) {
  291.         window.O7763 = {}
  292.         window.O1123 = "var playerList = {"
  293.         for (index = 0; index < ig.game[entities].player.length; ++index) {
  294.             guy = ig.game[entities].player[index];
  295.             if (guy && guy[id]) {
  296.                 window.O7763[guy.screenName] = {body: guy.attachments.b.id, id:guy[id]}
  297.                 window.O1123+='"'+guy.screenName+'"'+": "+"{body: "+'"'+guy.attachments.b.id+'"'+", id:"+'"'+guy[id]+'"'+"}, "
  298.                 if (!getRef[guy.screenName]) {getRef[guy.screenName] = {id:guy.attachments.b.id, type:"BODY"}}
  299.             }
  300.         }
  301.         window.O1123 += "}"
  302.         success()
  303.         consoleref.log(window.O1123)
  304.     }
  305.    
  306.     if (text == "clk!") {
  307.         ig.game.camera[camlock]()
  308.         success()
  309.     } else if (text == "ignore all!" || text == "block all!") {
  310.         for (index = 0; index < ig.game[entities].player.length; ++index) {
  311.             guy = ig.game[entities].player[index];
  312.             block(guy)
  313.         }
  314.         success()
  315.     } else if (text == "retreat!") {
  316.         ig.game.gravity = 0;
  317.         ig.game[player].pos.x += 999999
  318.         ig.game[player].pos.y += 999999
  319.         success()
  320.     }
  321.    
  322.     //for all player-based commands
  323.     for (index = 0; index < ig.game[entities].player.length; ++index) {
  324.         guy = ig.game[entities].player[index];
  325.         if (text == "get " + guy.screenName + "!") {
  326.             ig.game.motionDialog[motion]('gets')
  327.             getItem({type:"BODY",id:guy.attachments.b.id})
  328.             success()
  329.         } else if (text == "git " + guy.screenName + "!") {
  330.             ig.game.motionDialog[motion]('gets')
  331.             getItem({type:"BODY",id:guy.attachments.b.id})
  332.             ig.game[player][changename](guy.screenName)
  333.             ig.game[player].pos = guy.pos
  334.             success()
  335.         } else if (text == "tele " + guy.screenName + "!") {
  336.             ig.game.motionDialog[motion]('teles')
  337.             ig.game[player].pos = guy.pos
  338.             success()
  339.         } else if (text == "find " + guy.screenName + "!") {
  340.             ig.input.actions["rightclick"] = true
  341.             window.startingOffset = {x:ig.game.camera.offset.x,y:ig.game.camera.offset.y}
  342.             offset = offset(ig.game[player].pos,guy.pos)
  343.             offset.x-=(ig.system.width/2)
  344.             offset.y-=(ig.system.height/2)
  345.             ig.game.camera.offset.x = offset.x
  346.             ig.game.camera.offset.y = offset.y
  347.             success()
  348.         } else if (text == "block " + guy.screenName + "!" || text == "ignore " + guy.screenName + "!") {
  349.             ig.game.motionDialog[motion]('blocks')
  350.             block(guy)
  351.             success()
  352.         }
  353.     }
  354.    
  355.     if (text == "respawn!") {ig.game[player].kill=window.trueKill;ig.game[player].kill();success()}
  356. }
  357.  
  358. function getItem(item) {
  359.     if (item.type == "BODY") {
  360.         ig.game[itemmanage][getitem](ig.game[player], ig.game[itemmanage].slots.BODY, item.id, null, "STACKWEARB");
  361.     } else if (item.type == "WEARABLE") {
  362.         ig.game[itemmanage][getitem](ig.game[player], ig.game[itemmanage].slots.WEARABLE, item.id, null, "STACKWEAR");
  363.     } else if (item.type == "INSTRUMENT") {
  364.         ig.game[itemmanage][getitem](ig.game[player], ig.game[itemmanage].slots.HOLDABLE, item.id, null, "STACKINSTR");
  365.     } else if (item.type == "DYNAMIC") {
  366.         ig.game[itemmanage][getitem](ig.game[player], ig.game[itemmanage].slots.WEARABLE, item.id, null, "DYNATHING");
  367.     } else if (item.type == "BRAIN") {
  368.         ig.game[itemmanage][getitem](ig.game[player], ig.game[itemmanage].slots.BRAIN, item.id, null, item.type);
  369.     } else {
  370.         ig.game[itemmanage][getitem](ig.game[player], ig.game[itemmanage].slots.HOLDABLE, item.id, null, item.type);
  371.     }
  372. }
  373.  
  374.  
  375.  
  376. init()
Add Comment
Please, Sign In to add comment