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: loadstring replacement idea!

Previous Thread :: Next Thread 
gskw is not online. gskw
Joined: 05 Jan 2013
Total Posts: 1364
09 Aug 2014 02:25 AM
So...
I thought if you could call a PHP script through HttpService and send the script to it as POST data. The PHP script would then upload an asset containing the script and would then echo its ID. Then you could easily insert the asset to your game and have a loadstring replacement. Also, the first byte (or maybe bit to be more compact?) of the POST data could identify if the script should be a LocalScript or a server script.
What do you think about this?
The only thing I'm unsure about is, is it possible to tell the ID of the last uploaded asset?

This is a signature. Recommended username: MagicalGskw
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
09 Aug 2014 02:46 AM
Yeah, but that seems tedious. DataBrain has a custom loadstring so that would probably be easier to use.

Also for the server it'll require your authentication cookie to upload it and that changes each time you login I believe.
Report Abuse
gskw is not online. gskw
Joined: 05 Jan 2013
Total Posts: 1364
09 Aug 2014 03:22 AM
Yeah, it changes every time you log in, but I think you can still use the old cookie or create an alt you never use.

This is a signature. Recommended username: LittleGskw
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
09 Aug 2014 03:53 AM
Creating an alt is probably a better idea.
You don't want your main's models full of stuff.
Report Abuse
gskw is not online. gskw
Joined: 05 Jan 2013
Total Posts: 1364
09 Aug 2014 01:23 PM
So, I have now succesfully uploaded a few models from PHP, however, their names somehow changed to "[ Content Deleted ]". Is that because they are numbers only?

This is a signature. Recommended username: LikeableGskw
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
09 Aug 2014 02:18 PM
I honestly don't know, but try some naming convention.
Script1
Script2
and so on
Report Abuse
gskw is not online. gskw
Joined: 05 Jan 2013
Total Posts: 1364
09 Aug 2014 02:27 PM
Yeah, it works perfectly now. Here's an example script:
local id = game.HttpService:PostAsync("http://gskw.noip.me:555/cyghome/uploadto/uploadto.php", "src=print'hi'", 2) -- 2 == application/x-www-form-urlencoded
print(id)
Basically it prints the ID of the newly created ModuleScript model. I will consider moving stuff to my alt, but I'll do that later.

This is a signature. Recommended username: SkinnyGskw
Report Abuse
MakerModelLua is not online. MakerModelLua
Joined: 24 Feb 2013
Total Posts: 3544
09 Aug 2014 02:32 PM
you mean game.HttpService:PostAsync()?

Never give out your cookies kids... No really, look: http://wiki.roblox.com/images/1/13/Scam1.png
Report Abuse
Skemboy01 is not online. Skemboy01
Joined: 01 Sep 2010
Total Posts: 485
09 Aug 2014 03:07 PM
seriously scriptings badd


This is a signature. IRecommended usernameI: ExtremeSkemboy01
Report Abuse
dogwarrior24 is not online. dogwarrior24
Joined: 10 Nov 2010
Total Posts: 1401
09 Aug 2014 03:21 PM
Databrains custom loadstring is glitchy af.



loadstring("Workspace.Base:Destroy()")() -- databrains loadstring

> error: not a table


If his loadstring has some strange functionality that is different from normal Lua's loadstring, he doesn't provide any info on what that is.
Report Abuse
gskw is not online. gskw
Joined: 05 Jan 2013
Total Posts: 1364
10 Aug 2014 03:06 AM
Yes @MakerModelLua

This is a signature. Recommended username: TearfulGskw
Report Abuse
gskw is not online. gskw
Joined: 05 Jan 2013
Total Posts: 1364
10 Aug 2014 07:15 AM
After 5 hours of work, it's done!
pastebin/9NDETSGu
Have fun flooding my models with ModuleScripts :-)

This is a signature. Recommended username: GreenGskw
Report Abuse
deviantWater is not online. deviantWater
Joined: 22 Jul 2014
Total Posts: 662
10 Aug 2014 08:56 AM
Problem: Captcha will be required after a certain amount of multiple logins / Solution: Use the cookie text and store it for a week (the cookie expires in a week) Create a cron job that relogins.
Report Abuse
BowtieMod is not online. BowtieMod
Joined: 01 Apr 2013
Total Posts: 804
10 Aug 2014 11:05 AM
Wait

We can HttpGet now?
Report Abuse
gskw is not online. gskw
Joined: 05 Jan 2013
Total Posts: 1364
10 Aug 2014 12:12 PM
^
game:GetService("HttpService"):PostAsync()

This is a signature. Recommended username: DivergentGskw
Report Abuse
gskw is not online. gskw
Joined: 05 Jan 2013
Total Posts: 1364
17 Aug 2014 04:03 AM
It works!
http://www.roblox.com/loadstring-Installer-item?id=172601249
Use that plugin...
Examples:

--// Server loadstring()
local loadstring = require(workspace.LoadString_Server);
loadstring("print'hi&hi'")();

--// Local loadstring()
local loadstring = require(game:GetService("Players").LocalPlayer.PlayerGui:WaitForChild("LoadString_Client"));
loadstring("print'hi&hi'")();

Please, post or PM if it is broken or something!

This is a signature. Recommended username: OldGskw
Report Abuse
NewtPewt is not online. NewtPewt
Joined: 30 Oct 2013
Total Posts: 1084
17 Aug 2014 10:07 AM
@MagicalGskw
I don't think you'd be able to tell the ID of the last uploaded asset because then you'd need a statement declaring it. If there's nothing declaring the ID, you won't be able to see it.
Report Abuse
gskw is not online. gskw
Joined: 05 Jan 2013
Total Posts: 1364
17 Aug 2014 11:24 AM
I made a script that checks for the latest uploaded model of HttpGetAsync. No problems will appear.

This is a signature. Recommended username: SomberGskw
Report Abuse
digpoe is not online. digpoe
Joined: 02 Nov 2008
Total Posts: 9092
17 Aug 2014 11:32 AM
It's probably easier to make a bytecode parser than it is to make a lua lexer
Report Abuse
dogwarrior24 is not online. dogwarrior24
Joined: 10 Nov 2010
Total Posts: 1401
17 Aug 2014 11:35 AM
That supposed working loadstring throws this error.

10:33:33.334 - No assetUrl set
10:33:33.337 - Script 'Plugin_172601249.Script', Line 2
10:33:33.340 - Stack End
Report Abuse
gskw is not online. gskw
Joined: 05 Jan 2013
Total Posts: 1364
17 Aug 2014 12:22 PM
I forgot to upload the fix.
Update the plugin and it should start working~

This is a signature. Recommended username: TiresomeGskw
Report Abuse
dogwarrior24 is not online. dogwarrior24
Joined: 10 Nov 2010
Total Posts: 1401
17 Aug 2014 12:56 PM
Installing loadstring()
11:56:04.227 - httpGet http://www.roblox.com/asset/?id=172601041&serverplaceid=0&clientinsert=0 failed. Trying again. Error: Asset is not trusted for this place. Elapsed time: 0.391013
11:56:04.231 - httpGet failed. Trying again. Elapsed time: 0.391013
11:56:04.455 - Content failed for http://www.roblox.com/Asset/?id=172601041&serverplaceid=0&clientinsert=0 because Asset is not trusted for this place
11:56:04.458 - Content failed because Asset is not trusted for this place
11:56:04.466 - UploadAsset is not a valid member of Model
11:56:04.469 - Script 'Plugin_172601249.Script', Line 10
11:56:04.471 - Stack End
Report Abuse
gskw is not online. gskw
Joined: 05 Jan 2013
Total Posts: 1364
17 Aug 2014 01:09 PM
Okay, take this model (don't insert it): http://www.roblox.com/loadstring-working-in-2014-item?id=172601041
It should work now. If not... hmm...
Report Abuse
dogwarrior24 is not online. dogwarrior24
Joined: 10 Nov 2010
Total Posts: 1401
17 Aug 2014 01:22 PM
Mk, it works
Report Abuse
dogwarrior24 is not online. dogwarrior24
Joined: 10 Nov 2010
Total Posts: 1401
17 Aug 2014 01:32 PM
Would this still work, if i placed the Loadstring_Client and the UploadAsset in replicatedstorage?

What i mean with this is also changing upasset to this:

local function upasset(src)
return game:GetService("ReplicatedStorage"):WaitForChild("UploadAsset"):InvokeServer(src)
end
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