Let me explain better, I have a shop script that uses more than one currency. if the player has at least the required amount of one of the currencies, then the item is bought.
Ex. The item costs 5 burgers and 3 kittens, if I have 5 burgers OR 3 kittens, the transaction is made. is there a function in lua that lets you break out of a function?
if currency1.Value > num then --subtract item else --break out of function end
Make the function return
If you need to come out of a function immediately, you can use the return
keyword to do it.
The equivalent keyword for escaping loops is break