A calculation question!

Hey everyone! I got a little question here!

So basically i want to calculate how much a rebirth costs!

The principe is as follows:

So if you buy one rebirth it’ll cost 100 and after that with each new rebirth you buy the price doubles!
The script knows how many rebirths one has with the help of a value…
The question is how do you make it do that lol

So for example how do you get the price of the 10th rebirth? Or another feature i wanted to add is to buy 10 at a time with the same concept, so the rebirth prices get multiplied the more you buy!

Thanks for the help!

100*2^numRebirths.

this will double the cost every time from its current value
100*2^0 = 100
100*2^1 = 200
100*2^2 = 400
100*2^3 = 800
100*2^4 = 1600

This is useful in other contexts too, you can use this same basic principle to triple, quadruple and so on.

2 Likes