Easy Datastore Plugin (Free to use!)

I recently made a plugin that lets you create datastores for your game just by adding a value to a folder. Not everything is possible with this, such as level uploading or other complex datastores, but inventory systems and stat saving systems will work just fine.

This is new, and I’m still working on it. Expect bugs, and please report them if you find any. This has been tested, and I’m currently working on a game with it, but there still may be problems with it.
It’s also not super polished in terms of nice looking UI, but it still works as it should.

Get the plugin: Easy Datastore - Roblox

Instructions:
Video: How to make a DataStore Script in 5 Minutes | Roblox Studio - YouTube

Instructions

General:
Everything you need will be directly inside of the game once you have installed the plugin and relaunched studio.
image

The welcome badge is exactly what it sounds like, you paste the badge ID and it’ll give it to any player that joins.
image

The DataName value is what the datastore name is, the default is “PlayerData … EasyDataStore”.

To add a value to save, just add it to the InPlayer folder. This is what will be directly inside the player. You can also add folders to store data to make it more clean.

If you don’t want a specific value to save, whether it be in an inventory item or just something inside the player, just add a value inside of the object called “NoSave”.

Make sure to turn the “Apply” value to true after making changes
image

Inventory saves
To make an inventory save, add a StringValue named “IsInventory” into the folder you want to be an inventory.
Here are the possible values (This is all inside the disabled “Information” script):

Right now, you can only store tools, string/int/number/bool values, and folders as an inventory item, but that will probably expand later on.

DATA KEYS
(Taken from the disabled “Information” script)

Other:
The script it creates is inside of the folder in ServerScriptService, and it will archive your last script, but no more than that.

Again, if there’s any bugs, Please tell me! If you want something to be added, just post the suggestion in the replies and I’ll try to add it.

Plugin: Easy Datastore - Roblox

Thanks for reading, good luck developing.

Remember to hit “Apply” to get the new changes!

Changelog:

Changelog

v0.11:

  • Fixed the script saving value “IsInventory” as a stat.

v0.12:

  • Slightly different script structure
  • BindToCloseWait value, so you can change to a higher/lower wait time.

v0.13:

  • Fixed “NoSave” not working on inventory item values.

v0.14:

  • Better script structure, for more efficient saving.

v0.15:

  • Added AutoApply value, which detects changes made and automatically applies them. There may be bugs with it.
  • Added “PrintApplyMessage” value, which you can toggle on and off, so it doesn’t say “Applied!” on the screen when you make a change. Changes will still be applied, just won’t show the text.

v0.16

  • Added Color3Value being able to be saved.
  • Click to see reply #12
Reply12

New update with extra value being able to be saved, the Color3Value. It can only be saved when outside of an inventory, or inside of a CloneWithValues folder/value/tool. It cannot be the value with the values inside of it, though.

Example of a hierarchy would look like this:

Inventory
->IsInventory (CloneWithValues)
→ StringValue/IntValue/NumberValue/BoolValue/Folder/Tool
→ Color3Value
→ Color3Value
→ StringValue
→ IntValue

v0.17
Added ability to have up to 10 save scripts. Information is documented in the “Information” script.

Currently Testing
  • Use of multiple datastore scripts, up to 9 extra (10 total).
Planning on adding
  • Optional flag for manual saves, so you can have your own autosave function, or make certain datastores save at different points in the game.
  • (?) Possibly a feature that lets you archive more than your last script, something like “AmountArchived”
17 Likes

I don’t think I said this, so I will now.
Any changes I make to the plugin I’ll add to the changelog and instructions section above.

1 Like

Try UpdateAsync and have basic server locking that is optional

1 Like

Not sure what server locking is, but I’ll try to figure out updateasync, I’ve never used it.

1 Like

people found an exploit with an “exploit” called mulitinstance.exe (it allows multiple clients on same computer). Server locking prevents joining and leaving so fast that you can dupelicate items.

getAsync caches the value ( for 4 seconds) so item duplication is very easy. You might not need to do server-locking, checking the value twice is good enough. (after the 4 seconds)

updateAsync can check the old value. Before changing the value, check the old value with getAsync and then updateAsync and if they are diffrent, they have logged in to a diffrent server quickly.

Of course, make this optional

1 Like

Okay, would I store if they’ve left in the past 5 seconds in a datastore or use broadcastingservice or something?

Or save os.time() as their last join?

1 Like

An easy way is getAsync then updateAsync. UpdateAync changes the value the old value, and you can check if the two values are different. If they are, you can fix it. Or, you can set a value when the player leaves and check if the player left and joined quickly (4 - 5 is enough), before reading data

1 Like

Just wanted to say that this is an amazing module!
One suggestion is to make the apply value automatic so it applies every few seconds or so, I’m not sure if there were issues if you have tried that previously but it would be easier as I keep forgetting to apply changes.

1 Like

Hmmm is this can save tools from buy with points or credits once they come back and their tools is saving?

1 Like

Yeah, whenever I use it I have the same problem, so I’ll try to experiment with that today. Not sure if it’ll work or not, one problem might be that if you’re in the middle of editing something it puts the wrong value, but I’m not sure. Also, if you’re making something else you don’t want applied it’ll just do it, though I guess you can just turn it off temporarily. I’ll experiment with it anyways.

1 Like

Alright, added it. It detects changes made, though it might be buggy. I’ve done some testing with it, and it seems to work fine, just still not sure. If it can’t detect certain changes, please say what specifically, and I’ll do my best to fix it.

1 Like

New update with extra value being able to be saved, the Color3Value. It can only be saved when outside of an inventory, or inside of a CloneWithValues folder/value/tool. It cannot be the value with the values inside of it, though.

Example of a hierarchy would look like this:

Inventory
->IsInventory (CloneWithValues)
→ StringValue/IntValue/NumberValue/BoolValue/Folder/Tool
→ Color3Value
→ Color3Value
→ StringValue
→ IntValue

New feature!

You can now have up to 10 datastore scripts with this plugin! This lets you seperate your data and keys into multiple places.
Inside the “Information” script, all the information is there.

-- EXTRA SAVE SCRIPTS
-- To make an extra save script, copy the template parented to this script, and change it.
-- Make sure to parent it to EasyDataStore.
-- If you want to make another one, make sure to change the DataName value, and also change
-- the name of the folder to increment by 1. (e.x. "DS2", "DS3", etc...)
-- The name of the folder HAS to be DS followed by a number, capping at 9.
-- NOTE: AUTOAPPLY FEATURE DOES NOT CURRENTLY WORK WITH THIS YET. USE THIS AT YOUR OWN RISK,
-- IT HAS BEEN TESTED, BUT NOT TO A GREAT EXTENT.

It now has been tested more, but it still might have some issues. So far it’s worked fine, but be careful!

1 Like

But is it safe? For example, if somebody were to hack your plugin or something, could they inject viruses into your game?

When is another update coming? Is the plugin still indevelopment or been discountiuned?

is it supposed to reset the inplayer folder after restarting studio?