How to make? class system

it shows me what the next boost will be*

and I want to make it so that it shows what a boost I have right now

I always get this error after I buy a y class help fix my script and error

Players.Lamino961.Backpack.Punch.AddStrength:18: attempt to perform arithmetic (mul) on number and nil - Client - AddStrength:18

and it gives out this error in endurance, so this is the script

local cooldown = false
local player = game.Players.LocalPlayer
local addStat = game.ReplicatedStorage.AddStat
local getClassMult = game:GetService("ReplicatedStorage").RemoteFunctions.RetrieveClassMult

script.Parent.Activated:Connect(function()
	local End = player.Endurance
	local eZoneMulti = player.eZoneMulti
	local multi = player.eMulti.Value
	local fusionMult = player.BestFusion.FusionMulti.Value
	local classMult = getClassMult:InvokeServer()
	
	---------------------------------
	--        ADDING              --
	--------------------------------
	
	if cooldown == false then
		cooldown = true
		addStat:FireServer("Endurance", eZoneMulti.Value*classMult*fusionMult*multi, "+")
		script.Parent.Enabled = false
		wait(1.5)
		script.Parent.Enabled = true
		cooldown = false
	end
end)

you can so that when the player buys the last class and at the end it wrote max like this is the maximum class

The game is just ready to do it and that’s it

Can you help add an abbreviation?

You can abbreviate the classes by taking the first letter.

local a = className:sub(1,1)

And where to write it in what line?

I don’t know where it should be, but I think it should be in the function. But it was an example.

I see, thank you, but you can help, I have a problem when I buy a class of 3 classes, my tools start to not work

It gives an error and does not pump, can you help fix it?

I think that is from the tool script, what is the tool script?

my endurance script

local cooldown = false
local player = game.Players.LocalPlayer
local addStat = game.ReplicatedStorage.AddStat
local getClassMult = game:GetService("ReplicatedStorage").RemoteFunctions.RetrieveClassMult

script.Parent.Activated:Connect(function()
	local End = player.Endurance
	local eZoneMulti = player.eZoneMulti
	local multi = player.eMulti.Value
	local fusionMult = player.BestFusion.FusionMulti.Value
	local classMult = getClassMult:InvokeServer()
	
	---------------------------------
	--        ADDING              --
	--------------------------------
	
	if cooldown == false then
		cooldown = true
		addStat:FireServer("Endurance", eZoneMulti.Value*classMult*fusionMult*multi, "+")
		script.Parent.Enabled = false
		wait(1.5)
		script.Parent.Enabled = true
		cooldown = false
	end
end)

error

Players.Lamino961.Backpack.Punch.AddStrength:18: attempt to perform arithmetic (mul) on number and nil - Client - AddStrength:18

and script strength


local cooldown = false
local player = game.Players.LocalPlayer
local addStat = game.ReplicatedStorage.AddStat
local getClassMult = game:GetService("ReplicatedStorage").RemoteFunctions.RetrieveClassMult

script.Parent.Activated:Connect(function()
	local zoneMulti = player.ZoneMulti
	local multi = player.Multi.Value
	local fusionMult = player.BestFusion.FusionMulti.Value
	local classMult = getClassMult:InvokeServer()
	
	---------------------------------
	--        ADDING              --
	--------------------------------

	if cooldown == false then
		cooldown = true
		addStat:FireServer("Strength", zoneMulti.Value*classMult*fusionMult*multi, "+")
		script.Parent.Enabled = false
		wait(1.5)
		script.Parent.Enabled = true
		cooldown = false
	end
end)

I think the problem is from the getClassMult, what is the script that manages it on the server?

func.OnServerInvoke = function(player)
	local class = player.Class
	local mults = require(game.ServerStorage["classMults"])
	
	local classMult
	if class.Value == "F-Class" then
		classMult = mults.fClass
	elseif  class.Value == "D-Class" then
		classMult = mults.dClass
	end
	
	return classMult
end
func.OnServerInvoke = function(player)
	local class = player.Class
	local mults = require(game.ServerStorage["classMults"])
	
	local classMult
	if class.Value == "F-Class" then
		classMult = mults.fClass
	elseif  class.Value == "D-Class" then
		classMult = mults.dClass
	end
if not classMult then warn("no classMult, default to 1") classMult = 1 end
	
	return classMult
end

Try that.