so i want to make a rebirth system in my game but it didn't work if my coin up to 100 how to fix it ?
Rebirths.OnServerInvoke = function(player)
local ded = player.leaderstats.Deaths.Value
if player.leaderstats.Deaths.Value == 100 then
player.leaderstats.Rebirths.Value = player.leaderstats.Rebirths.Value + 1
player.leaderstats.Deaths.Value = 0
else
if player.leaderstats.Levels.Value == 20 then
player.leaderstats.Levels.Value = 0
else
player.PlayerGui:WaitForChild("RebirthGui").TextLabel.Visible = true
wait(2)
player.PlayerGui:WaitForChild("RebirthGui").TextLabel.Visible = false
end
end

4 comments
why is people down vote me for no reason?
I really dont know why you said if your coin was 100 because I dont see anything about coins in the script, but if you are talking about deaths, then I would recommend using elseif instead of using that many else. I dont really see anything wrong though!
e.g.
elseif deaths ~= 100 then gui.Visible = falseYour question is too broad. I don't see a single word in your script called "coins". And you are not explaining your question properly. 1 line of explanation and then the rest just your code is not the way to ask questions.
@totosimamora608, see help: https://scriptinghelpers.org/help/how-post-good-questions-answers