I obfuscated a simple script. Can you "decrypt" it?

  • About
    Well, I remember I had a script "encryptor" or also known as an obfuscator that basically hides your code in a special way in order to prevent skidding or scriptnapping.

    Where do I start?
    First, I would like to say this is a "challenge" for everyone since I'm challenging you to decrypt this script essentially.
    Next, here's the link to the script, please note this is extremely long and can crash your studio or any lua compiler.

    How do I use this?
    Well basically, just run into any lua compiler (must be lua 5.1) or in roblox studio and it should print out a couple of messages in the output.

    And if I do crack it?
    Well, I'm pretty sure you won't be able to crack it since it hasn't been cracked before, but if you do, please reply with how you did it.


  • @HaloUlti you round down some numbers and do some maths in general

  • Interesting first response, well maybe not interesting since I hear it every time when people see my script.

  • @HaloUlti

    Couldn't find this anywhere on Google.


    But if you put the hash right there it should be easy.


  • It should be obvious, I would never put a hash thats hashed with a hasher thats public. I use a custom hasher.

  • @HaloUlti

    Then It's impossible to decrypt. Unless you know the "pass".

  • https://pastebin.com/FRahURF1

    This is not good at all as it uses a large amount of table to obfuscate numbers and it is bad to create tables and remove then quickly which is why this code is so slow. This also does not add to the complexity of the code.

    Obfuscation is not encryption please do not mix those terms but encryption can be used to hide strings in the code adding to the complexity.

    Overall the obfuscation used in the code is very poor and you can easily tell what it is doing like trying to mimic a stack but using the basic functions all within the table which can be changed with ease. Though someone with no experience would be put off any porgrammer will be able to recode this and even create their own input.

    Do not rely on badly made obfuscation tools as this uses the same variable names for the same things!!! ie DpfjMGzsJazsaUJG is used in the for loops making this easy to just find and replace.

    Obfuscation is not a solution to your problem instead create better server <-> client security by implementing the correct checks and using remotes correctly.

  • @kingdom5

    I never obfuscated any scripts before so I knew nothing xd

  • @Aimarekin There are lots of things you can do but some will slow down the code a lot.

    The idea is to hide what the code contains and how the code runs ie calls from one function to another. Both areas are key to obfuscation.

    A gereral list is from a accademic paper I read (note this is for a java based application)

    Method level (function)

    • String Encryption
    • Integer Encoding
    • Array Index Shift
    • removal of scope ie private, protected
    • Locals Composition (local variables moved into an array or other types ie "hi" = {"h", "i"})

    Class level (objects)

    • Extract Method (creation of new functions that runs the original function)
    • Encapsulate Fields (variable moved into functions and accessors / mutator functions created)
    • Move Fields (variables moved to another class)
    • Move Methods (where possible move functions into a different class)
    • Merge Methods (same input and output types methods combine logic)

    I hope this helps show how much more can be done with obfuscation.

  • @kingdom5 So what is encryption then?

  • @Phlegethon5778 A method of changeing text using a key and algorithm into code which can also be inverted using the same key.

  • I mixed the word's encryption and obfuscation together for most people since a lot of people come on scriptinghelpers that don't study in obfuscation. It's best to just put them together and the code doesn't run slow it's optimized and barely makes the execution 0.2 ms slower. It's just incredibly huge and all of the code is used.

  • @HaloUlti 800 lines of code it not large at all lol. As I said its how this creates lots of tables all of which need memory allocated then removed.

    Your code code using the test below is about half as slow as my version.
    your code 3.698169708252 my code 1.4659614562988

    local data = "" -- the data
    local yourCode = require(script["your code"])
    local myCode = require(script["my code"])
    local runNum = 100
    local tm, tm2
    tm = tick()
    for i=1, runNum do
    tm = tick() - tm
    tm2 = tick()
    for i=1, runNum do
    tm2 = tick() - tm2
    print("your code", tm, "my code", tm2) 

  • My script is not there for optimization! :D
    It's supposed to be long and supposed to be confusing not utterly minified and optimized for industrial uses of lag-free scripts

  • Global Moderator

    Obfuscation is pointless and only adds unnecessary overhead and complexity to your code.

  • Would agree,

    but you just don't know the main reasons of obfuscation

    so universally, your thinking wasn't smart.

  • @SmartNode Too much work. Don't bother.

  • Global Moderator

    @SmartNode what lol

    You think I don't know the idea behind obfuscation?

  • No, you don't

  • @SmartNode

    @incapaz said in I obfuscated a simple script. Can you "decrypt" it?:

    @SmartNode Too much work. Don't bother.

Log in to reply

Looks like your connection to Scripting Helpers was lost, please wait while we try to reconnect.