Cannot figure out how to add level system into my datastore

local replicatedStorage = game:GetService("ReplicatedStorage")
local LevelUp = replicatedStorage.Remotes:WaitForChild("LevelUp")
local getDataFunction = replicatedStorage:WaitForChild("GetData")

local player = game.Players.LocalPlayer
local playerData = {}

local gui = script.Parent
local BarBG = gui.BarBG
local LevelLabel = BarBG.Level
local Bar = BarBG.Bar
local Exp = BarBG.Exp

playerData = getDataFunction:InvokeServer()

local function updateLevel()
	if not playerData then return end
	LevelLabel.Text = "Level "..playerData.Level
	Exp.Text = playerData.Exp.."/"..playerData.ExpNeeded

	if playerData.Exp >= playerData.ExpNeeded then
		print("leveled")
		LevelUp:FireServer(player,playerData)
	end

	
		Bar:TweenSize(UDim2.new((playerData.Exp/playerData.ExpNeeded),0,1,0),"Out","Quint",0.3,true)
end

updateLevel()

local replicatedStorage = game:GetService("ReplicatedStorage")
local LevelUp = replicatedStorage.Remotes:WaitForChild("LevelUp")

LevelUp.OnServerEvent:Connect(function(player,playerData)
	print("LEVELED")
	playerData.Level = playerData.Level + 1
	playerData.Exp = playerData.Exp - playerData.ExpNeed
	
end)


this is my current datastore which im trying to add this system to ive been trying to do this for hours and cannot get this working

You can easily make the system inside the data.

-- Declaring a required experience formula --
local function experienceFormula(Level)
    return math.round(math.pow((Level + 1) / 0.9 * 3), 2) - math.pow((Level) / 0.9 * 3), 2))
end

-- Declaring level, experience and required experience --
local Level = Instance.new("IntValue", Stats)
Level.Name = "Level"

local Experience = Instance.new("IntValue", Stats)
Experience.Name = "Experience"

local requiredExperience = experienceFormula(Level.Value)

-- Detecting changes --
Experience.Changed:Connect(function()
    if Experience.Value >= requiredExperience
        Experience.Value -= requiredExperience -- Fair option
        Level.Value += 1
        requiredExperience = experienceFormula(Level.Value)
    end
end)

image
is there any way i could add this into my current datastore table?