Hey there So im working on a game right now (cant reveal the name) but we made a rebirth system but it isnt exactly a proper rebirth system so the problem is what do I do to change this script to a multiplier script with the requirements to rebirth to increase each time you rebirth
game.ReplicatedStorage.RebirthEvent.OnServerEvent:connect(function(player) if player.leaderstats.Chords.Value >= 100 then -- strength needed to rebirth player.leaderstats.Rebirths.Value = player.leaderstats.Rebirths.Value +1 player.leaderstats.Chords.Value = 0 end end)
here chords is a type of money (coins) that the player needs to rebirth but how do we make it so that each time you rebirth the required amount multiplies by itself (in this case first time 100 second time 100 x 100 etc) as well as the number from first time being 2x to 4x then to 6x etc.
the next thing is the multiplier, each time we click a tool that gives chords how do we make it so that it will give 2x or 4x or 6x according to your rebirth stats
Any type of help is appreciated :D
do this:
game.ReplicatedStorage.RebirthEvent.OnServerEvent:connect(function(player) local rebirthCost = player.leaderstats.[make a leaderstats value for the default rebirth cost (100)] if player.leaderstats.Chords.Value >= rebirthCost.Value then -- strength needed to rebirth player.leaderstats.Rebirths.Value = player.leaderstats.Rebirths.Value +1 player.leaderstats.Chords.Value = 0 rebirthCost.Value = rebirthCost.Value * rebirthCost.Value end end)
And in the script that money do this
-- imagine that the line underneath is the line that gives you the money money.Value = money.Value + (1 * plr.leaderstats.Rebirths * 2) -- add everything in the brackets
this should work but if it doesnt it would really help if you showed the script that gives you the money.
The formula for 1st question: 1st rebirth you need the requirement 100 second time 100 x 100
Simply, 100^(HowManyTimesRebirthed+1)
will be the rebirth requirement formula
2nd:
2*(HowManyTimesRebirthed+1) + ChordsGavenPerHit
Will be the multiplier, just include it on your knife