How would I add up in developer products until the player has payed the wanted price?

I’m making a donation script, and I want it so a player can type a amount in the textbox, and it will keep adding up in dev products until it has reached the price. I have no clue where I should start. Any help would be great!

I have three full pages of dev products.

1 Like

This is actually not possible yet with studio, but there is a feature that was requested on this and was already mentioned here:

1 Like

So there is no way roblox can do some math to do it?

I have ALOT of dev products, enough to make up numbers

I made a post about the ScriptersCF donation centre a few months ago which does exactly this. Its source is available on GitHub, so you’re free to have a look and make use of it.

The general idea is that it iterates through a dictionary of developer products, checking whether the price is greater than or equal to the amount that the user has inputted. If so, it prompts them to purchase the product and deducts its price from the inputted value. This is continued until the value becomes 0, which means the total has been paid.


1 Like