ezSave V1 - Shortcut Module For DataStore2

What is ezSave?

ezSave is a module for DataStore2.
It has some functions for saving, loading and more.
There are currently few functions. But I’ll add more soon.

Why ezSave?

ezSave is easy to use and even people who isn’t good at coding can do things with DataStore2

Examples

Load Example:

local ezSave = require(location)
game.Players.PlayerAdded:Connect(function(Player)
ezSave.Load(Player, "Cash")
local playerCash = ezSave.res
end)

Save Example:

local ezSave = require(location)
game.Players.PlayerRemoving:Connect(function(Player)
ezSave.Save(Player, "Cash", Player.Cash.Value)
end)

Documentation

Mods

There are also mods for ezSave Which can made by anyone. There is currently 1 mod that is created by me. It’s called ezStats. It’s really easiest way to make a leaderstat which is fully configurable.
If you want to learn more about ezStats, go here https://github.com/Zelqify/ezSave/tree/main

Get ezSave

You can put the module to anywhere you want. I preffer ServerScriptService. So it’s not reachable from client.

Any problems? Feel free to say me.

7 Likes

will test it ty hope it works well

1 Like

seems cool but how do i save multiple values in it?
like a table?

It’s same as DataStore2. Which can save everything that is can saved by DataStore2.
Unfortunaly it doesn’t support multiple parameters but you can always save tables.

You can do it like this example:

game.Players.PlayerRemoving:Connect(function(Player)
local ezSave = require(game.ServerScriptService.ezSave)
local myTable = {"Hello","Hi","This is a testing"}
ezSave.Save(Player, "table_test", myTable)
end)

Also If you don’t understand the second parameter in the Save() function, it is the key for our saving. And it is recording as Player.UserId … yourkey when ezSave is saving it.

so if i were to load it i would say

ezSave.Load(key,data)
local value1 = data[1]
...

am i right?

No, that’s wrong.

ezSave.Load(Player, Key) -- No need for more arguments.
local loadedData = ezSave.res[1]

You should identify the player that you are loading its data.

In DataStore2, you can say it like GetAsync(key, data) or GetAsync(key). In ezSave you just do it like

ezSave.Load(Player, Key) -- No need for more arguments.
local loadedData = ezSave.res

V1.0.1 - 21/7/21

Added some small tutorials to github that is bit hard to do.

Upcoming:

  • More functions
  • Mod library folder
1 Like