KodingKid

Basic Cryptocurrency System in Lua

Apr 29th, 2021 (edited)
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.50 KB | None | 0 0
  1. while wait(math.random(1,10)) do --generates a new number every 1-10 seconds
  2. local currency1 = math.random(-100000,100000) --said number will be between -100,000 and 100,000
  3. end
  4. wallet = 0
  5. s = io.read("*n") --will require a number to be inputted
  6. if s == currency1: --if the input is equal to the number generated...
  7.     wallet + 1 --you will get 1 coin
  8. end
  9. wait(1,10) --when done, after 1-10s it will load up the amount of money you have made
  10. print(wallet / 100) --100 coins = £1 / 1 coin = 1p
  11. end
Add Comment
Please, Sign In to add comment