CrowClaws
|
  |
| Joined: 04 Jul 2010 |
| Total Posts: 4466 |
|
|
| 07 Jun 2015 07:39 PM |
Are there any advantages to requiring a module with an id e.i
require(11414221)
If there are any advantages, do they involve protecting your code from theft? |
|
|
| Report Abuse |
|
|
DataStore
|
  |
| Joined: 07 Feb 2012 |
| Total Posts: 8540 |
|
|
| 07 Jun 2015 07:43 PM |
| I believe the only advantage is that it protects your code, as to any other advantages I'm not sure. |
|
|
| Report Abuse |
|
|
CrowClaws
|
  |
| Joined: 04 Jul 2010 |
| Total Posts: 4466 |
|
|
| 07 Jun 2015 07:44 PM |
So it does protect your code.
correcto? |
|
|
| Report Abuse |
|
|
FootBa11
|
  |
| Joined: 16 Sep 2008 |
| Total Posts: 11501 |
|
|
| 07 Jun 2015 07:44 PM |
What could be cool if you could do:
require(game:service("InsertService"):LoadAsset(12345))
Im not sure if that works though.
Would be hella neat if it does |
|
|
| Report Abuse |
|
|
CrowClaws
|
  |
| Joined: 04 Jul 2010 |
| Total Posts: 4466 |
|
|
| 07 Jun 2015 07:44 PM |
@foot
you can literally use require(ID) if it's a moduel and it would work lmao. |
|
|
| Report Abuse |
|
|
FootBa11
|
  |
| Joined: 16 Sep 2008 |
| Total Posts: 11501 |
|
|
| 07 Jun 2015 07:45 PM |
orly?
So you can require scripts not inserted in your game without using insertservice?
Thats dope y0 |
|
|
| Report Abuse |
|
|
CrowClaws
|
  |
| Joined: 04 Jul 2010 |
| Total Posts: 4466 |
|
|
| 07 Jun 2015 07:46 PM |
not any scripts; module scripts
so someone confirm, does putting your code and requiring it with an ID truely protect it?
|
|
|
| Report Abuse |
|
|
FootBa11
|
  |
| Joined: 16 Sep 2008 |
| Total Posts: 11501 |
|
|
| 07 Jun 2015 07:55 PM |
Well duh. Im not an idiot.
And you can only require insert things with insert service if they are created by you or roblox.
I Imagine require is the same way.
So nobody else can require your code. |
|
|
| Report Abuse |
|
|
FootBa11
|
  |
| Joined: 16 Sep 2008 |
| Total Posts: 11501 |
|
| |
|
CrowClaws
|
  |
| Joined: 04 Jul 2010 |
| Total Posts: 4466 |
|
|
| 07 Jun 2015 07:56 PM |
ic
also I just found out the client can't require(assetid)
imma cri.
that makes sense dough |
|
|
| Report Abuse |
|
|
FootBa11
|
  |
| Joined: 16 Sep 2008 |
| Total Posts: 11501 |
|
|
| 07 Jun 2015 07:57 PM |
But,
I bet you could make a remotefunction that returns a required assetid :D?
So it would accomplish the same thing |
|
|
| Report Abuse |
|
|
CrowClaws
|
  |
| Joined: 04 Jul 2010 |
| Total Posts: 4466 |
|
|
| 07 Jun 2015 07:58 PM |
oh that could work maybe?
I can just require it via require it then hand the table to clients as they join |
|
|
| Report Abuse |
|
|
CrowClaws
|
  |
| Joined: 04 Jul 2010 |
| Total Posts: 4466 |
|
|
| 07 Jun 2015 08:26 PM |
| wait it seems not to be working??? |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 07 Jun 2015 08:32 PM |
You can only insert stuff you/roblox own using InsertService. Using require(assetID), you can require anyone's modulescript so long it's name MainModule (even if it is copylocked).
And no, it does not guarantee your code is 100% unstealable. But the best you can do is just set script = nil inside and anytime your functions use a global (print, etc.), make sure to use upvalues instead [unless you don't return a function in anyway]. |
|
|
| Report Abuse |
|
|