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: Where is the MainModule located when required by id?

Previous Thread :: Next Thread 
ked2000 is not online. ked2000
Joined: 10 Jul 2011
Total Posts: 1059
25 Jul 2016 01:59 PM
I tried testing this by making the module error when required. However, I got this for the full name:

13:52:04.074 - Model.MainModule:10:
13:52:04.074 - Stack Begin
13:52:04.075 - Script 'Model.MainModule', Line 10
13:52:04.075 - Stack End



So where is it actually located?
Report Abuse
BothAngles is not online. BothAngles
Joined: 01 Dec 2011
Total Posts: 9604
25 Jul 2016 02:00 PM
Nowhere
Report Abuse
ISHOOTPPL is not online. ISHOOTPPL
Joined: 06 Dec 2014
Total Posts: 109
25 Jul 2016 02:14 PM
DataModel; aka Game
Report Abuse
ked2000 is not online. ked2000
Joined: 10 Jul 2011
Total Posts: 1059
25 Jul 2016 02:15 PM
Printed script.Parent, script.Parent's children, & script.Parent.Parent.

Model
Model.MainModule

nil



...Annnnd wtf.
Report Abuse
DurstAuric is not online. DurstAuric
Joined: 12 May 2009
Total Posts: 8066
25 Jul 2016 02:22 PM
Nowhere. [2]
Don't try to steal people's modules now, will you. That's the idea of them being private.


( ͡• ◡ ͡•) -=[ RAP: 364,856 || DurstAuric; the narb of ROBLOX ]=- ( ͡• ◡ ͡•)
Report Abuse
ked2000 is not online. ked2000
Joined: 10 Jul 2011
Total Posts: 1059
25 Jul 2016 04:18 PM
@DurstAuric

Nah, I'm just trying to make it so the MainModule can only be required by require(assetId).
Report Abuse
DurstAuric is not online. DurstAuric
Joined: 12 May 2009
Total Posts: 8066
26 Jul 2016 07:08 AM
script = nil at the beginning of the script and name the Module MainModule and publish it on another account which doesn't have any active places. If your module has children then instead of script = nil, do this: local Children = script:GetChildren() script = Instance.new("ModuleScript") for _, Child in pairs(Children) do Child.Parent = script end

To require your module, you use its model id.


( ͡• ◡ ͡•) -=[ RAP: 364,438 || DurstAuric; the narb of ROBLOX ]=- ( ͡• ◡ ͡•)
Report Abuse
Flux_Capacitor is not online. Flux_Capacitor
Joined: 07 Apr 2008
Total Posts: 45720
26 Jul 2016 08:09 AM
It's not parented (aka it's "parented to nil").
If you have a reference to it you can still change the parent but as Durst/i forgot the name said, you can easily prevent that.
Report Abuse
ked2000 is not online. ked2000
Joined: 10 Jul 2011
Total Posts: 1059
27 Jul 2016 05:35 PM
"publish it on another account which doesn't have any active places"

Why?
Report Abuse
DurstAuric is not online. DurstAuric
Joined: 12 May 2009
Total Posts: 8066
27 Jul 2016 06:11 PM
As you can still gain access to the module if the owner has an active place.


( ͡• ◡ ͡•) -=[ RAP: 348,613 || DurstAuric; the narb of ROBLOX ]=- ( ͡• ◡ ͡•)
Report Abuse
ked2000 is not online. ked2000
Joined: 10 Jul 2011
Total Posts: 1059
27 Jul 2016 06:14 PM
How is that possible?
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
27 Jul 2016 06:17 PM
If someone hacked a simple script that inserted the module, they could then get the source with HxD or Cheat Engine or something, if they knew how Roblox stores bytecode.

If the module isn't in your inventory and wasn't created by you, they can't access it inside of one of your places. Otherwise, if it is either in your inventory, or made by you, they can access it inside of your place.


Report Abuse
DurstAuric is not online. DurstAuric
Joined: 12 May 2009
Total Posts: 8066
27 Jul 2016 06:17 PM
Don't argue, but it is. Trust me. Just publish it on another account.


( ͡• ◡ ͡•) -=[ RAP: 348,727 || DurstAuric; the narb of ROBLOX ]=- ( ͡• ◡ ͡•)
Report Abuse
DurstAuric is not online. DurstAuric
Joined: 12 May 2009
Total Posts: 8066
27 Jul 2016 06:21 PM
^^


( ͡• ◡ ͡•) -=[ RAP: 348,723 || DurstAuric; the narb of ROBLOX ]=- ( ͡• ◡ ͡•)
Report Abuse
ked2000 is not online. ked2000
Joined: 10 Jul 2011
Total Posts: 1059
27 Jul 2016 06:26 PM
Thanks everybody for helping!

Time to make a new account then.
Report Abuse
Flux_Capacitor is not online. Flux_Capacitor
Joined: 07 Apr 2008
Total Posts: 45720
27 Jul 2016 06:37 PM
Jarod stop being dumb, you can only require by ID server sided, and not only that but HxD is not going to help you fetch the source from Roblox considering all it is is a hex editor. And you cant "hack scripts" and if someone does manage to get server sided Script Injection, it still wouldn't help unless they _are_ the server considering the ModuleScript exists only in the server's memory. Even then it would bw hard to get if you don't have a ref to the actual module so youd end up resorting to sniffing.
Report Abuse
Flux_Capacitor is not online. Flux_Capacitor
Joined: 07 Apr 2008
Total Posts: 45720
27 Jul 2016 06:38 PM
And if someone does have it in their inv already, then it must not have been copylocked at one point to begin with.
Report Abuse
Flux_Capacitor is not online. Flux_Capacitor
Joined: 07 Apr 2008
Total Posts: 45720
27 Jul 2016 06:43 PM
Tfw i didnt read duric's post and jumped to conclusions, woops
Report Abuse
DurstAuric is not online. DurstAuric
Joined: 12 May 2009
Total Posts: 8066
28 Jul 2016 08:38 AM
@Flux
Lmao, it's okay. xd


( ͡• ◡ ͡•) -=[ RAP: 350,703 || DurstAuric; the narb of ROBLOX ]=- ( ͡• ◡ ͡•)
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
28 Jul 2016 08:49 AM
It's a model, it doesn't exist in your game, requiring by id is requiring it from roblox's site, that's why it has to be named MainModule. If you can get a reference, yes you can parent it, and then save the place, that's why you should add the line 'script = nil' ontop of the script, and make sure to never exposing a reference to any of the module's children (assuming they have/need them)

For example if your module is a gui module and you store some simple template guis inside, never make them globals, and definitely don't parent them to StarterGui or somewhere (as a person could then reference them and set up an AncestryChanged event so if you parented it back they could find the new parent.
Report Abuse
DurstAuric is not online. DurstAuric
Joined: 12 May 2009
Total Posts: 8066
28 Jul 2016 08:50 AM
@War
I don't think them stealing the Gui's would be much of an issue though, but you'd have to do this:

local Children = script:GetChildren() script = Instance.new("ModuleScript") for _, Child in pairs(Children) do Child.Parent = script end


( ͡• ◡ ͡•) -=[ RAP: 350,649 || DurstAuric; the narb of ROBLOX ]=- ( ͡• ◡ ͡•)
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
28 Jul 2016 08:55 AM
@Durst In the imaginary situation I set up, a module is cloning (or parenting but I'm using cloning for simplicity in the example) a template gui to the StarterGui for something, and then parents it back to the module itself for the module to do some work on it.

Observe:


game.StarterGui.ChildAdded:connect(c)
c.AncestryChanged:connect(function(o,p)
if p.Name == 'MainModule' then
p.Parent = workspace
--save place
end
end)
end)


In other words, using what they parent to expose a reference to the module, which would allow us to steal the module. I don't care about the guis themselves; I am using them as a stepping stone to getting the source code.
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
28 Jul 2016 09:00 AM
Also take note that if a module were to expose themselves like this, a reference to the script variable wouldn't matter, so script = nil isn't stopping the one trying to steal the code.
Report Abuse
DurstAuric is not online. DurstAuric
Joined: 12 May 2009
Total Posts: 8066
28 Jul 2016 09:00 AM
So you'd have to script the gui and parent the stuff to the player?


( ͡• ◡ ͡•) -=[ RAP: 350,676 || DurstAuric; the narb of ROBLOX ]=- ( ͡• ◡ ͡•)
Report Abuse
DurstAuric is not online. DurstAuric
Joined: 12 May 2009
Total Posts: 8066
28 Jul 2016 09:03 AM
Like:

-- Module
script = nil
game:GetService("Players").PlayerAdded:connect(function(Player)
Player.CharacterAdded:connect(function(Character)
local ScreenGui = Instance.new("ScreenGui", game.Players:GetPlayerFromCharacter(Character).PlayerGui) -- Just for an example.
end)
end)
return "Loaded"


-- Normal script
if require(ModuleID) ~= "" then repeat wait() end


( ͡• ◡ ͡•) -=[ RAP: 350,676 || DurstAuric; the narb of ROBLOX ]=- ( ͡• ◡ ͡•)
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