Suphi's DataStore Module

I don’t see why it would stop working

1 Like

In case you doubt the reliability of this module, I wanted to share my personal experience with it.

Used it for my new game and everything is going great. MemoryStore usage is negligible (<2%), and no data loss at all. Main feature for me was the ease of use in programming it. Was able to develop all datasaving much faster compared to using ProfileService.

Overall a very robust system, thanks again.

3 Likes

Just wanted to chime in with a real-world example of this module being used by us in Zombie Zone, with 200+ CCU for the past month and no reports of any data issues. Amazing module and makes DataStores a breeze to work with. Thank you for this resource!

1 Like

Can anyone help me with this wrapper, Its not working and I’m not sure as to why

Hi,

I see that the SDM Module (downloaded using the toolbox) is a client script. So, is it no problem if I put this script under StarterPlayerScripts?

Thank You

its a modulescript and it only works on the server side

maybe you downloaded the wrong thing

Screenshot 2025-01-29 132845

ok, I think it’s client file as the color is similiar.

But how to make sure module script safe, are below suggestion correct?

A ModuleScript can work on both the server side and client side
but because Suphi’s DataStore Module only works on the server side
there is no point replicating it to the client (it would just waste network data for no reason)
so you will want to put the ModuleScript inside ServerScriptService or ServerStorage

I think this might be a good video for you to watch:

And maybe this one as well:

This should show you that replicating a ModuleScript to the client has zero effect for exploiters
exploiters are capable of injecting there own custom code/scripts any code found inside a ModuleScript is not required by the exploiter

1 Like

what do you think about the new ProfileStore that loleris released? Is Suphi’s Datastore still superior?

1 Like

Not sure if it’s a relevant question seeing as how Suphi’s can accomplish things that aren’t possible by ProfileStore

If you’re talking about ease of use, having used both Suphi’s and ProfileService and ProfileStore, ProfileService/Store is easier to use at the beginning as a new user.

But in my opinion after you get used to it Suphi’s is better all around.

Also, pretty sure suphi’s uses 50% less datastore requests since it only really has to use Set requests.

Can you update the module to automatically convert Lua objects to forms compatible with JSON?Like for example, turning Color3s into Hex codes?

this module does not scan your data this was a design choice so the module does not know what types you have used so would not be able to automatically convert them to make them compatible

maybe you could make a external module to converte types before setting and reading values or maybe you could modify the save/load functions to scan the value before saving/loading but that’s not something I personally would be willing to add

1 Like

Ah, that makes sense. Though if the concern is privacy-related you could write a function for data conversion, but have a variable(off by default) that specifies whether or not to use that function

But if you don’t feel like adding it like that either, I can implement the logic on my end :)

The concern is not privacy-related its performance related
the datastore is saved every 30 seconds by default
and if there are 100s of players in your game

I don’t want the module to constantly have to traverse complex tables and check the type of every value my goal is to keep the module as lightweight as possible

1 Like

Just wondering, how would you check if a value was changed via the datastore, not the specific value (IntValue) in the Leaderstats folder? Ex; If you have settings how can you check if the value was changed incase the game did it via a different script through events and module scripts.

You can probably make your own signal for that.

Tried doing this, it worked but the only issue is that, I believe due to .Changed signal being discontinued the StateChanged function no longer works properly, causing the leaderstats to not update.

1 Like

What script do you open the datastore in?

Actually, after looking further the StateChanged function seems to be working perfectly, considering it printed 1337. What’s the actual issue you’re facing?

If it’s the leaderstats, you don’t seem to be changing the leaderstats value, only the datastore’s value.

After adding 100 to dataStore.Value.Cash, do the following:

dataStore.Leaderstats.Cash.Value = dataStore.Value.Cash

to visually update the leaderstats value.

Additionally, if you plan to increment stats multiple times or by different amounts from different scripts, you can also create a custom function in each dataStore as seen here:

This is useful to not repeat the same code multiple times, and it can be changed by just changing the function.

1 Like