generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: LocalScripts being stolen from games

Previous Thread :: Next Thread 
1waffle1 is online. 1waffle1
Joined: 16 Oct 2007
Total Posts: 16381
22 Nov 2011 05:47 PM
hax?
Report Abuse
Corecii is not online. Corecii
Joined: 06 Aug 2010
Total Posts: 687
22 Nov 2011 05:53 PM
Can't like, any script be stolen, since the place is sent to the client? And of course, localscripts are, so they can be run on the client.

If you consider getting what Roblox sends to the client (for stealing anything) hax, then yes, it's hax.
Report Abuse
swmaniac is not online. swmaniac
Joined: 28 Jun 2008
Total Posts: 15773
22 Nov 2011 07:33 PM
Yes, any script can be stolen. :/
Are the threads in which how to copy-protect scripts (as much as we can) is discussed.

http://www.roblox.com/Forum/ShowPost.aspx?PostID=50856125
http://www.roblox.com/Forum/ShowPost.aspx?PostID=54495006
Report Abuse
JulienDethurensb is not online. JulienDethurensb
Joined: 13 Jul 2010
Total Posts: 155
22 Nov 2011 07:48 PM
Script Precompiling
------------------------

THIS METHOD MAKES IT IMPOSSIBLE TO RECOVER THE SOURCE. MAKE SURE TO KEEP A COPY OF THE SOURCE. I AM NOT RESPONSIBLE IF YOU LOSE A SCRIPT'S SOURCE CODE BECAUSE YOU USED THIS. KEEP IN MIND THAT THIS METHOD IS NOT REVERSIBLE.

This script compiles a script. Once a script is compiled, the source can't be recovered. It just CAN'T be recovered, because it doesn't exist anymore. This is not encrypting, this is compiling. It's like when you compile a program. You can't get the source back once it's machine code.

local source = [===[

print "Hello World!" -- Replace this by your code.

]===]

local bytecode = string.dump(loadstring(source, "")) -- Compiles the source to bytecode.
bytecode = bytecode:gsub('.', function(char) return '\\' .. char:byte() end) -- Replaces every character by its ASCII representation.
print("loadstring(\"" .. bytecode .. "\")()") -- Prints an executable version of the bytecode.
Report Abuse
popinman322 is not online. popinman322
Joined: 04 Mar 2009
Total Posts: 5184
22 Nov 2011 07:51 PM
@Julien, I've certainly "de-compiled" a script before. :/
Report Abuse
swmaniac is not online. swmaniac
Joined: 28 Jun 2008
Total Posts: 15773
22 Nov 2011 07:52 PM
Sort of, there ARE decompilers that can recover source.

The most secure way as decided by those two threads:

1) Compile source (Not on Roblox, get actual Lua - Roblox saves the source along with the compiled code).
2) Use luac.exe to strip the script's debug information.

Note that even with these, it's possible to decompile to a point, but by stripping the debug information all the variable names and line numbers are gone. It's obfuscation at it's best for Roblox.
Report Abuse
JulienDethurensb is not online. JulienDethurensb
Joined: 13 Jul 2010
Total Posts: 155
22 Nov 2011 07:56 PM
"@Julien, I've certainly "de-compiled" a script before. :/"

You can't. The comments and many other things are destroyed. You can't get the source back. If you know Lua Assembly and you are willing to spend 3 hours on this, then you can get something that looks slightly like the source back. But if I was you, I'd just remake the script from scratch. It'd take less time.

"Sort of, there ARE decompilers that can recover source.

The most secure way as decided by those two threads:

1) Compile source (Not on Roblox, get actual Lua - Roblox saves the source along with the compiled code).
2) Use luac.exe to strip the script's debug information.

Note that even with these, it's possible to decompile to a point, but by stripping the debug information all the variable names and line numbers are gone. It's obfuscation at it's best for Roblox."

Incase you didn't know, my method _IS_ compiling the script. Also, scripts compiled with luac can not use ROBLOX's features such as creating instances with Instance.new or access the Workspace with the Workspace variable or using the game variable. In fact, they can't use anything that is specific to ROBLOX. I believe your scripts are boring, if all they do is print stuff in the output.

However, stripping the debug information can be useful, even though it is kind of uneeded.

And no, my method is not reversible. The source is destroyed when you precompile a script. You can't "uncrypt", because it's not an encryption. Decompiling is not a thing that is possible. You can't decompile something, as that'd mean getting the source back. And the source CAN'T be recovered. The comments and many other things are REMOVED. The source doesn't exist anymore.
Report Abuse
swmaniac is not online. swmaniac
Joined: 28 Jun 2008
Total Posts: 15773
22 Nov 2011 07:59 PM
@Julien

1) Google Lua Decompiler. They exist.
2) Scripts compiled with luac CAN use Roblox functions and objects, I know, I've used them.
3) Unless you strip the debug information, the comments are the only things that are destroyed.

Report Abuse
JulienDethurensb is not online. JulienDethurensb
Joined: 13 Jul 2010
Total Posts: 155
22 Nov 2011 07:59 PM
"Sort of, there ARE decompilers that can recover source."

There isn't a single Lua decompiler. In fact, there isn't a single decompiler for anything.

Sometimes, a program pretends to be a "decompiler". In fact, it doesn't really decompile anything, it just creates a source file that does the same thing as the compiled file. But that source file is not THE SOURCE. It is just a source that does the same thing. That same source might actually be way harder to read because it hasn't been formatted and doesn't have comment.

And just producing a source file that does the same thing is actually EXTREMLY hard. It is possible, but trust me, it's not worth it.

Also, there isn't a single complete decompiler for machine code that currently works completely and supports everything. Anyways, since there are so many languages that translate to machine code, you'd need a different decompiler for every language, so you should just forget it.

And there isn't a single Lua decompiler that supports everything either. But there are very good ones though.
Report Abuse
popinman322 is not online. popinman322
Joined: 04 Mar 2009
Total Posts: 5184
22 Nov 2011 08:00 PM
I don't care about variable names or comments, I hardly use them myself(comments, that is). ;3
Report Abuse
JulienDethurensb is not online. JulienDethurensb
Joined: 13 Jul 2010
Total Posts: 155
22 Nov 2011 08:00 PM
"3) Unless you strip the debug information, the comments are the only things that are destroyed."

Wrong.
Report Abuse
swmaniac is not online. swmaniac
Joined: 28 Jun 2008
Total Posts: 15773
22 Nov 2011 08:04 PM
Comment withdrawn for the decompiler, however:

"It is just a source that does the same thing."

Then for copy-protection, it wouldn't matter, would it?

But yes, if you compile the source with Luac it does still work in Roblox with all Roblox objects (I just tested it, it works).
Report Abuse
JulienDethurensb is not online. JulienDethurensb
Joined: 13 Jul 2010
Total Posts: 155
22 Nov 2011 08:04 PM
Even if the comments were the only thing removed, which is not actually the case, the source code would be lost. The source is destroyed.

Suppose I made a really big script. And then compiled it. And then gave the compiled version to you.

Would you be able to come back to me with a Lua script in which every single byte is identical to every single byte in the original version? No. You wouldn't be able to.
Report Abuse
JulienDethurensb is not online. JulienDethurensb
Joined: 13 Jul 2010
Total Posts: 155
22 Nov 2011 08:07 PM
"But yes, if you compile the source with Luac it does still work in Roblox with all Roblox objects (I just tested it, it works)."

With luac, I'm not sure. I don't remember exactly from last time I tried. But if you used string.dump in normal Lua, then nope.

ROBLOX produces more bytecode than Lua, which is normal, as it needs some things that Lua doesn't have. If you compile with Lua, you don't have these things.

And stripping the debug information is just a pure waste of time, seriously. It's not like anyone is really going to waste time on your script to decompile it.

Also, there isn't a single decompiler, even incomplete, for ROBLOX Lua scripts, so you don't have to worry anyways.
Report Abuse
JulienDethurensb is not online. JulienDethurensb
Joined: 13 Jul 2010
Total Posts: 155
22 Nov 2011 08:11 PM
And I can provide more proof if you want:

I compiled this:

print "lololol"

And then I tried to decompile it with a Lua decompiler.

Result:

print("lololol")

The source isn't the same. I don't care what you say, _THE SOURCE ISN'T THE SAME_.

You have no way of knowing if the person used parenthesis or not and you have no way of knowing how much spaces he put, how indented it was or anything like that. You have no way of knowing it. Because it was destroyed by the compiler.
Report Abuse
swmaniac is not online. swmaniac
Joined: 28 Jun 2008
Total Posts: 15773
22 Nov 2011 08:13 PM
Julien...
While the fact that the source is not the same is accurate, if it decompiles enough to find where the script says something along the lines of:

if game.PlaceId ~= PlaceId then
...
end

Then any copy-protection we put in can be broken, making compiling it pointless anyway.
Report Abuse
JulienDethurensb is not online. JulienDethurensb
Joined: 13 Jul 2010
Total Posts: 155
22 Nov 2011 08:15 PM
swmaniac, there is no decompiler for ROBLOX Lua scripts. So people would need to do it all by hand. Which, trust me, requires a lot of work. And it also requires them to know LASM. Almost nobody on ROBLOX knows LASM.
Report Abuse
Candymaniac is not online. Candymaniac
Joined: 08 Oct 2009
Total Posts: 8985
23 Nov 2011 07:32 AM
Do you know LASM?
Report Abuse
Radioaktiivinen is not online. Radioaktiivinen
Joined: 25 Apr 2009
Total Posts: 18629
23 Nov 2011 07:43 AM
Or you can just script your game so that theres dependencies between stuff everywhere, no documentation, and no variable names, so that if someone takes your script he will have to rewrite half of it and it wouldnt even work because he couldnt understand the script.

Another way would be to take the whole game but they wouldnt have the server side scripts... (well idk if those are sent to clients, just make em local to the server?)
Report Abuse
popinman322 is not online. popinman322
Joined: 04 Mar 2009
Total Posts: 5184
23 Nov 2011 08:43 AM
local _ = game
local __ = Workspace
local ___1 = {"children", "BreakJoints", "GetService"}
local ___2 = function(o, n, ...) return o[___1[n]](o, ...) end
local ___3 = function(s) return ___2(_, 3, s) end

local ____ = ___3("Players")
local _____ = ___3("Teams")

Report Abuse
popinman322 is not online. popinman322
Joined: 04 Mar 2009
Total Posts: 5184
23 Nov 2011 08:45 AM
    local _ = game
    local __ = Workspace
    local ___1 = {"children", "BreakJoints", "GetService"}
    local ___2 = function(o, n, ...) return o[___1[n]](o, ...) end
    local ___3 = function(s) return ___2(_, 3, s) end
    
    local ____ = ___3("Players")
    local _____ = ___3("Teams")

Whoops! :3
Report Abuse
Radioaktiivinen is not online. Radioaktiivinen
Joined: 25 Apr 2009
Total Posts: 18629
23 Nov 2011 08:47 AM
Cant... Parse...
Report Abuse
popinman322 is not online. popinman322
Joined: 04 Mar 2009
Total Posts: 5184
23 Nov 2011 08:59 AM
OH! You could make a scripting language that only uses underscores? (Isn't there one already?)

Then "compile" the engine! :D
Report Abuse
Merlin11188 is not online. Merlin11188
Joined: 20 Dec 2007
Total Posts: 4158
23 Nov 2011 09:30 AM
Even better than underscores is a language called whitespace. It only uses whitespace characters.
Report Abuse
popinman322 is not online. popinman322
Joined: 04 Mar 2009
Total Posts: 5184
23 Nov 2011 09:47 AM
LOL
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image