What I mean: I looked at really, really old Scripts and Codes from 2008 or 2009-2011, and I saw this certain type of code that looks like this:
local Script = Instance.new("Script") Script.Source = [[print("Hello, User!")]] Script.Parent = game.Workspace --Or local String = "m/Hello, User!" local Script = Instance.new("Script") Script.Source = string.sub(msg,3) Script.Parent = game.Workspace
So, as the title says, why did users do this back then using Normal Scripts? I question: Why did users do this back then, and what was the main purpose of this?
For the most part, there isn't a good reason. A combination of coroutine
s and loadstring
get the same result as creating a Script object (but loadstring
should be frowned upon anyway).
Probably a lot of it came from ignorance of loadstring
and coroutine
s. Since there were fewer script-writers, and they had been working with ROBLOX for less time, there wasn't as much information on how to do things like that as there is now.
Some of it might have been for obfuscation; you get one complicated script that unpacks itself to do other things (though this can be defeated anyway).
One uncommon but reasonable use was to save extremely large amounts of data neatly. You may recall that ROBLOX used to prompt owners of a place to "Save" when they left. If you had large amounts of data (as opposed to just models) that you wanted to save, it might be convenient to store it in a Script -- they have very large maximum lengths and support newlines. If you were interested in that, you could even make it produce a valid script that restores whatever you wanted it to.