Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Rebirth System? (Requirements and Multiplier)

Asked by 3 years ago
Edited 3 years ago

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

0
enderboy can you put the script that gives you money in your question please? Also does this "make it so that it will give 2x or 4x or 6x according to your rebirth stats" mean that 1 rebirth = x2, 2 rebirths = x4 and 3 rebirths = x6? grandiosav4 62 — 3y

2 answers

Log in to vote
0
Answered by 3 years ago

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.

0
ummm... You dont need to multiply 1 because it's the same thing.......???? but ok Xapelize 2658 — 3y
Ad
Log in to vote
0
Answered by
Xapelize 2658 Moderation Voter Community Moderator
3 years ago
Edited 3 years ago

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

Answer this question