Hey! ive been a scripter for a while and ive gotten used to it, though. i still cant seem to find the code required to make a max amount of Rebirths/Upgrades, you see, im making a Soul Ops game. Soul Ops Games are games based on UNDERTALE. here is an explanation shortly: you have to protect 6 SOULS, in a tube. And you have to upgrade tiers and use coins to unlock characters and get to the end of all the waves. Anyways, im trying to make the max amount of tier upgrades 9, here are the scripts i use:
script.AddPoint.OnServerEvent:connect(function(plr)
plr.leaderstats.Coins.Value = plr.leaderstats.Coins.Value +1 +plr.leaderstats.Tiers.Value
if plr.DoublePass.Value == true then
plr.leaderstats.Coins.Value = plr.leaderstats.Coins.Value +1 +plr.leaderstats.Tiers.Value
end
end)
script.Rebirth.OnServerEvent:connect(function(plr)
plr.leaderstats.Tiers.Value = plr.leaderstats.Tiers.Value +1
plr.leaderstats.Coins.Value = 0
end)
local plr = game.Players.LocalPlayer
script.Parent.MouseButton1Click:connect(function()
if (plr.leaderstats.Tiers.Value*0) +1250 <= plr.leaderstats.Coins.Value then
workspace.Events.Rebirth:FireServer()
end
end)
local plr = game.Players.LocalPlayer
while wait() do
if (plr.leaderstats.Tiers.Value*0)+1250 <= plr.leaderstats.Coins.Value then
script.Parent.Text = "1 Tier Required: BUY"
else
script.Parent.Text = "1 Tier Requires: ".. (plr.leaderstats.Tiers.Value*0) +1250 - plr.leaderstats.Coins.Value
end
end
if you can help, il appreciate it. Thanks!