Relatively Simple Datastore Module I made

Hey there i made an easy to use datastore module for beginners
it has 2 functions LoadData(plr,key,{folders}) and SaveData(plr,key,{folders})
this module can let you save multiple datastores for example a leaderstats datastore and a shop system datastore with just one function
here is an example usage

local dss = require(script.DSS)
game.Players.PlayerAdded:Connect(function(plr)
	local ls = Instance.new('Folder',plr)
	ls.Name = "leaderstats"
	local cash = Instance.new("IntValue",ls)
	cash.Name = "Cash"
    cash.Value = 0 --or any starter value you like
	local shop = Instance.new('Folder',plr)
	shop.Name = "shop"
	local ownitem = Instance.new("BoolValue",shop)
	ownitem.Name = "ownitem"
    ownitem.Value = false
	dss:LoadData(plr,plr.UserId,{ls,shop})
end)
game.Players.PlayerRemoving:Connect(function(plr)
	dss:SaveData(plr,plr.UserId,{plr.leaderstats,plr.shop})
end)
game:BindToClose(function()
	wait(5)
end)

What do you think about it?
Lemme know in the replies,And pls give me feedback as honest as you can even though its harsh cuz i like it
Datastore Module Souce Code

2 Likes