NXTBoy
|
  |
| Joined: 25 Aug 2008 |
| Total Posts: 4533 |
|
|
| 18 Mar 2012 07:30 AM |
I found a useful way to print out multiline text through Script.Source while in studio. Run this in command bar:
Instance.new("BindableFunction", game.Workspace).Name = "Print"
The every time you want to test your place, run this:
game.Workspace.Print.OnInvoke = function(n, str) local s = Instance.new("Script"); s.Name = n; s.Source = str; s.Disabled = true; s.Parent = game.Workspace end
Now, in your scripts, you can run:
game.Workspace.Print:Invoke("Title", "Long multiline\ncontent")
And it will generate a new script with `Long multiline\ncontent` as the Source, even though `.Source` is locked! |
|
|
| Report Abuse |
|
|
| |
|
|
| 18 Mar 2012 08:24 AM |
Tracking, I still don't how people could discover stuff like these...
"Knowledge talks, wisdom listens." |
|
|
| Report Abuse |
|
|
|
| 18 Mar 2012 08:32 AM |
| You can probably also use this to get large blocks of text too. Great for pasting lots of data without using a stringvalue. |
|
|
| Report Abuse |
|
|
Ozzypig
|
  |
| Joined: 27 Mar 2008 |
| Total Posts: 4906 |
|
|
| 18 Mar 2012 09:51 AM |
This makes me question the security context of the thread that is calling the :Invoke() function...
...and now they'll probably fix this and everyone will be sad. |
|
|
| Report Abuse |
|
|
Oysi
|
  |
| Joined: 06 Jul 2009 |
| Total Posts: 9058 |
|
| |
|
NXTBoy
|
  |
| Joined: 25 Aug 2008 |
| Total Posts: 4533 |
|
|
| 18 Mar 2012 01:45 PM |
> ...and now they'll probably fix this and everyone will be sad.
I don't think it's a security threat. I'm binding the `OnInvoke` handler in an elevated context, but firing it in a standard context. This only allows me to communicate between contexts. The handler doesn't persist, so there's no way of getting this elevated context when a server is running. |
|
|
| Report Abuse |
|
|