To use the module, put this code in a server script:
if( game.PlaceId > 0 )then
local GA = require(game:GetService("InsertService"):LoadAsset(171763666).MainModule)
GA.Init("UA--------") --Your unique ID
print("Analytics Fired")
end
No. It doesnât create any sort of object, so even with super-1337-uber-h4x to get an identity able to read Source, you canât steal it. The way youâd have to go about that is by watching (what Iâm guessing is) HTTP traffic to get the module, and then read the response. How do you do that? You donât.
[quote] You canât use require to grab an uploaded module on the clientâŚ?
In any case that you do want to use a module and keep the source secure, hereâs some nifty information.
I know that Seranok was having people try to steal the source of a module that he uploaded. From what I remember, the module must meet the following criteria to be secure:
[ul]
[li]Upload the module on an account with no active places
[ul]
[li]Prevents an exploiter from using LoadAsset on your ModuleScript to get itâs source.[/li]
[/ul]
[/li]
[li]Destroy the module the first chance you can.
[ul]
[li]Someone can insert the module (which defaults to parent to the Workspace iirc), then save the place (using the SavePlace method) and they have the source.[/li]
[li]Call the Destroy method on your module.[/li]
[/ul]
[/li]
[li]There cannot be a reference to the module instance.
[ul]
[li]You can use getfenv on the result, therefore you can reparent (or clone and reparent) the module to the workspace and save from there.[/li]
[li]Set script to nil at the top of your module and the resulting fenv has no reference to the module instance.[/li]
[/ul]
[/li]
[li]Wrap the functions so string.dump doesnât provide sensitive information.[/li]
[/ul]