Okay I tired in many ways to make a default value and failed. Currently I deleted the part of the default ( most of it only the vars are available ) Tha's my code
local Rep = game:GetService("ReplicatedStorage")
local DataStore2 = require(Rep:WaitForChild("MainModule"))
DataStore2.Combine("DataStoreOPM", "Level", "Points", "Exp", "MaxExp", "Strength", "Health", "Agility", "Money")
-- Defaults
local DefaultLevel = 1
local DefaultMaxExp = 50
local DefaultExp = 0
local DefaultPoints = 0
local DefaultStrength = 1
local DefaultHealth = 1
local DefaultAgility = 1
local DefaultMoney = 200
game.Players.PlayerAdded:Connect(function(Plr)
-- Store the values
local LevelStore = DataStore2("Level",Plr)
local ExpStore = DataStore2("Exp",Plr)
local MaxExpStore = DataStore2("MaxExp", Plr)
local StorePoints = DataStore2("Points", Plr)
local StrengthStore = DataStore2("Strength",Plr)
local HealthStore = DataStore2("Health",Plr)
local AgilityStore = DataStore2("Agility",Plr)
local MoneyStore = DataStore2("Money",Plr)
-- Leaderstats
local Data = Instance.new("Folder", Plr)
Data.Name = "Data"
local Level = Instance.new("IntValue", Data)
Level.Name = "Level"
local Exp = Instance.new("IntValue", Data)
Exp.Name = "Exp"
local MaxExp = Instance.new("IntValue", Data)
MaxExp.Name = "MaxExp"
MaxExp.Value = (Plr.Data.Level.Value + 1 ) * 1.25 *( 50)
local Points = Instance.new("IntValue", Data)
Points.Name = "Points"
local Strength = Instance.new("IntValue", Data)
Strength.Name = "Strength"
local Health = Instance.new("IntValue", Data)
Health.Name = "Health"
local Agility = Instance.new("IntValue", Data)
Agility.Name = "Agility"
local Money = Instance.new("IntValue", Data)
Money.Name = "Money"
-- Update Functions
local function UpdateLevel(GetData)
Level.Value = LevelStore:Get(GetData)
end
local function UpdateExp(GetData)
Exp.Value = ExpStore:Get(GetData)
end
local function UpdateMaxExp(GetData)
MaxExp.Value = MaxExpStore:Get(GetData)
end
local function UpdatePoints(GetData)
Points.Value = StorePoints:Get(GetData)
end
local function UpdateStrength(GetData)
Strength.Value = StrengthStore:Get(GetData)
end
local function UpdateHealth(GetData)
Health.Value = HealthStore:Get(GetData)
end
local function AgilityUpdate(GetData)
Agility.Value = AgilityStore:Get(GetData)
end
local function MoneyUpdate(GetData)
Money.Value = MoneyStore:Get(GetData)
end
-- Setting the functions here
UpdateExp()
UpdateHealth()
UpdateLevel()
UpdateMaxExp()
UpdatePoints()
UpdateStrength()
AgilityUpdate()
MoneyUpdate()
-- If the data update then save it
ExpStore:OnUpdate(UpdateExp)
HealthStore:OnUpdate(UpdateHealth)
LevelStore:OnUpdate(UpdateLevel)
StorePoints:OnUpdate(UpdatePoints)
StrengthStore:OnUpdate(UpdateStrength)
MoneyStore:OnUpdate(MoneyUpdate)
AgilityStore:OnUpdate(AgilityUpdate)
MaxExpStore:OnUpdate(UpdateMaxExp)
end)
I tried something like
local function UpdateLevel(GetData)
Level.Value = LevelStore:Get(GetData, DefaultLevel)
end
but it won't work idk why, Thanks also!

2 comments
I have player as Plr.
I sent down here the new version and its not working, pls check.