Sign ups are back :3 -Sukaira
Secure Script Execution: Difference between revisions
No edit summary |
|||
| Line 34: | Line 34: | ||
Now whenever the client opens it will automatically send you into the game, but you also have to worry about people who want to open the client to browse the site, but you could easily use the bootstrapper to open it using <code>-browser | Now whenever the client opens it will automatically send you into the game, but you also have to worry about people who want to open the client to browse the site, but you could easily use the bootstrapper to open it using <code>-browser | ||
[[Category:ReverseEngineering]] | |||
Revision as of 07:33, 24 October 2026
This tutorial focuses on the topic of securely executing scripts without the need for messing with security contexts.
Typical join script
Typically when writing a join script, you will encounter some context restricted actions such as using game:HttpGet or setting the player's name.
There is proof to support that this is how it worked with this (before bootstrapper handling it): https://web.archive.org/web/20071125221952/http://www.roblox.com/Game/PlaceLauncher.js which you can use for your place launcher as well
If you want to avoid these errors without having to screw over your client's security, keep reading:
ActiveX/COM Interfaces
If you have ever looked through old scripts that Roblox used such as PlaceLauncher.js you may have seen functions
such as CreateGame or StartGame before, and maybe if you tried to use these functions, they didn't work. Here is how to use them:
- In order for these functions to work you must have the proper typelibs registered, you can do this by:
- Run
cmdas administrator and changing the current directory to your client folder (cd %localappdata%/Roblox, for me) and then, - Run
RobloxApp /regserver(or whatever your client is named instead of RobloxApp)
Once this is done, let's start using these functions.
Typelib Functions
Open a new javascript file and begin by writing in a new function for our join script execution process.
It is recommended that you use the WindowExternal tutorial for this next part, as you can make better code than this.
https://gist.github.com/TienMilkman/7b5298a53ba1002ef6497a5bddb5f7e1 - Spoonfeed copypaste code
Putting our function to use
In order for our function to actually open the game, we need to open our game first since typelib functions only work in the client
In all versions of Roblox, there is a home page other than Default.aspx that you are met with once you open your client, it is typically /IDE/Landing.aspx or /IDE/Start.aspx
So with that, you need your function to execute on the home page of the client, simply include your javascript file on it and call the function
Now whenever the client opens it will automatically send you into the game, but you also have to worry about people who want to open the client to browse the site, but you could easily use the bootstrapper to open it using -browser