Amount per second tracker

Hello!
I want to achieve an amount per second tracker. Basically records the number changing and at what rate. Something like this:

image

The issue is I don’t know how to achieve this and I’ve tried researching the problem but I got no solutions related to my issue.
If you can help me with solving this I would really appreciate it. Thanks!

while true do
    amount1 = yourAmount
    wait(1)
    amount2 = yourAmount
    amountPerSecond = amount2 - amount1
end

This is the gist of it, but you’ll need to replace the yourAmount variable with your own. If you want to put it into another script, you may also want to look at using a coroutine.

2 Likes