Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

What kind of coding is this?

Asked by 9 years ago

I have looking at this script, and I found this strange coding that I've never seen before, what kind of coding is this? Here is an example of some of the coding (Not full code, code has too many Charcters);

108,111,99,97,108,32,83,111,110,103,115,32
1
Oh yeah, I've seen an old CFrame door use something like that. My guess is it's an outdated way of setting a target CFrame or such. deaththerapy 60 — 9y
0
deatherapy is referring to CFrame's nature of being a 3x4 matrix. While it's not smart to, you can explicitly define CFrames by listing their 12 defining numbers. The quoted values are not a valid CFrame though, so this guess is wrong. BlueTaslem 18071 — 9y
0
ooh an old post by thee death caster, EPIC greatneil80 2647 — 5y

1 answer

Log in to vote
2
Answered by
BlueTaslem 18071 Moderation Voter Administrator Community Moderator Super Administrator
9 years ago

This is an (extended) ASCII representation of text.

It corresponds to, in this case, the characters forming the string "local Songs ".


Strings are lists of characters. In Lua, a character is exactly one byte, which is a fundamental unit of computer memory. One byte can be any of 256 values; so ASCII* assigns one character to each of the numbers 0 to 255.


You can make strings by making a list of those character points.

Using string.char(byteValue) you make a single character from a number; using string.byte(character) you make a number from a single character.


The purpose of this most of the time is for scripters to attempt to obfuscate their code from people trying to read or modify it.

It is easy to undo this, though, so it's not particular effective, except that people not immediately familiar with it cannot understand what to do.

Since these strings can't actually be executed on their own, they need to be run through loadstring; since ROBLOX doesn't allow bytecode anymore, this text needs to be (more or less) human readable.

So, we can always crack any amount of simple string manipulations like this trivially:

local floadstring = loadstring;
function loadstring(s)
    print(s);
    -- Print anything run through loadstring.
    return floadstring(s);
end

Asterisk:

Technically, what Lua uses is not ASCII. ASCII actually only assigns 128 characters, not all 256;

ROBLOX uses Windows 1252 I believe. The text inside of that used for Lua code, which is limited to the newlines, tab, letters, and basic math, are the same in most single byte formats (including ASCII).

That means the extensions are essentially just cosmetic (think Wingdings).

0
So, its a form of coding that isn't very often used anymore, but can be used and used with Loadstring()();? TheeDeathCaster 2368 — 9y
0
Pretty much. It's not really a "form of coding" as much as meta-programming. It's not a good practice, so it's not something you should do unless you really know why you're doing it BlueTaslem 18071 — 9y
Ad

Answer this question