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
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