hi, i created this day, a custom leaderstats sistem and a DataStore better, it have some Addons but please, donât use the addon âGetValuesFronQueqeâ it will be used to make something like: a GUI to select what ur data to use, a code example:
local DataStore3 = require(4567739397)
game.Players.PlayerAdded:Connect(function(plr)
DataStore3:CreateLeaderstats(plr)
DataStore3:CreateValue('Money',10,'MoneySaveKey','Int') ; DataStore3:SetParent('Money',plr)
DataStore3:CreateValue('XP',10,'XpSaveKey','Int') ; DataStore3:SetParent('Xp',plr)
local money = DataStore3:GetObject('Money',plr)
money.Value = DataStore3:GetValue('Money',plr,10)
while wait(10) do
DataStore3:Increment('Money',50,plr)
end
end)
all the function:
non-addons:
1: CreateValue(ItemName,StartValue,TheSavingKey,Type) â This if not the player have in they leaderstats the item, it will clone in playerâs leaderstats
2: SetParent(ItemName,plr)
3: CreateLeaderstats(plr) creates a leaderstats in the player
4: SaveValue(plr,key,name{ex: xp}, TheValueToSave{ex: 10}) â if the queqe is full, it will wait until it isnât full
5: Increment(ItemName,valueToAd{needs to be a number},plr)
6: GetValue(name.plr,StartValue)
â// Advanced \â
1: SaveAllValues(leaderstats,plr) â It saves all the data to the saved keys
2: GetObject(ObjectName,plr)