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

How to make a cash system that gives cash every minute and stops when it reaches the cash limit?

Asked by
Volaaz -5
3 years ago

Hello, I'd like to know how to script a cash system that gives cash every minute or two and it should stop when it reaches the cash limit. If you can dm me on Discord Volaaz#0942

0
Please Answer If Could. Volaaz -5 — 3y
0
I've done that but do you know how to add a GUI with it to Volaaz -5 — 3y
0
first you should go to yt to learn about some uis, then, now if u have a text box, change the text box's text to the cash, you can do cash.toString() to make sure that it's a string, and the text of the text box will show ur current cash, NOTE: make sure that u are constantly checking if the cash value has changed or not to besure that the text will always be update daokhiethy 25 — 3y

1 answer

Log in to vote
1
Answered by 3 years ago
Edited 3 years ago

Maybe something like


local cash = 0 local time = 60 local cashLimit = 200 local amountPerGive = 39 -- set it to 39 because i want the to make it that it will always works even if 200/39 isn’t a full number, or whatever that type of number is called local function giveCash() while cash < cashLimit do if amountPerGive + cash > cashLimit then cash = cash + (cashLimit - cash) else cash = cash + amountPerGive end wait(time) end end spawn(giveCash)

NOTE: I don't know how to write a function that will constantly checking if something is true or not, if u can you should do it and always check and change the current cash to the cash variable, or just set the variable as the cash

If everything go correct to what I’m thinking it should go,u should have a variable that contain the cash data, now u can get that data and set it to be ur cash, tell me if it’s working or not cuz i’m on my phone and i can’t really check if it’s working or not, i will try to fix it if it’s not working

Ad

Answer this question