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 » Scripting Helpers
Home Search
 

Re: Decrypting using character byte codes

Previous Thread :: Next Thread 
ked2000 is not online. ked2000
Joined: 10 Jul 2011
Total Posts: 1059
08 Jun 2014 07:07 PM
Script:
splitter = "/"
decryption = 0

_G.Decrypt = function(code)
local file = Instance.new("StringValue", script)
decryption = decryption + 1
file.Name = "Decryption: "..decryption

if type(code) == "string" then
local halfNewCode = string.gsub(code, splitter, ", ")
haldNewCode = tonumber(halfNewCode)

if halfNewCode ~= nil or type(halfNewCode) == "number" then
local newCode = string.char(halfNewCode)

file.Value = tostring(newCode)
print(tostring(newCode))
return tostring(newCode)
end
end
end

msg = 102/117/110/99/116/105/111/110/58/32/50/53/53/65/49/54/54/48

_G.Decrypt(msg)

Error:
bad argument #1 to 'char' (number expected, got string)


Can someone tell me why this errors?
Report Abuse
Xsysix is not online. Xsysix
Joined: 29 Mar 2014
Total Posts: 1182
08 Jun 2014 07:08 PM
haldNewCode = tonumber(halfNewCode)

You spelled half wrong

- Add 1.5k | Deplexity | its a lego men game stop worrying
Report Abuse
ked2000 is not online. ked2000
Joined: 10 Jul 2011
Total Posts: 1059
08 Jun 2014 07:11 PM
@Xsysix

Hah, it was a silly mistake. Thank you. But now it prints blank and returns blank.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
08 Jun 2014 07:19 PM
That's not what byte code is (nor is that what Lua bytecode is, but that's beside the point). It is backward slash then the byte.

local byteCode = [[\102\117\110\99\116\105\111\110\58\32\50\53\53\65\49\54\54\48]];
local output = "";

for value in string.gmatch(byteCode, "[^\\]+") do
output = output .. value:char();
end

print(output);
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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