What's the securest place to store ModuleScripts in?

What’s the securest place to store ModuleScripts in?

If you don’t want to expose your module scripts to the client, store then in server script service or server storage

2 Likes

the safest place is replicated storage

1 Like

Nuh huh, it’s exposed to the client so they can see it’s source and steal the code

1 Like

But what If I want to require the ModuleScripts by a LocalScript?

In fact, any place for a module script is safe as long as the server script uses it. After all, there are 2 copies of the module script: one for local scripts and the second for server scripts. Cheaters can only change a copy of the local module, and everything will remain normal on the server

1 Like

Everything that you want to execute on the client WILL be on the client Wich means that the client can modify it’s Roblox (cheats) and copy the module. What do you want to do? What is the purpose of your module?

It’s a gamepasses module that has some functions and tables.

Is it possible to do gamepasses stuff through a Script?

You can prompt the gamepass purchase UI through the server.

Some say it’s not advisable to get the PlayerGui through a ServerScript, so Idk.

But I guess I’ll do it. I have no other options.

Thanks for your help also.

Actually, just prompt the game pass on the client. Then listen for prompt purchase finished on the server, check if it was actually purchased then you can reward the player depending on the purchase id

1 Like

Using a Remote Event, right? ‎ ‎ ‎

That method will fire on the server without remote events

1 Like

I got it.

Thanks! ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎

Np!
So you just purchase the gamepads on the client.
If they decide to press close without buying the pass, the server will fire the purchase finished function with the “wasPurchased” bool to false so you need to check if it was actually purchased(wasPurchased will be true if they click on OK after purchasing the pass)

1 Like

:+1:‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.