Advertisement
KodingKid

Lua Random Number Guesser Game - Optimised Edition

May 18th, 2021
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.31 KB | None | 0 0
  1. a = io.read("*n")
  2. b = function(x)
  3.     local c = math.random(1,10)
  4.     return x[c]
  5.     end
  6. if (a > c):
  7.     print("Lower!")
  8.     end
  9. if (c > a):
  10.     print("Higher!")
  11.     end
  12. if else:
  13.     print("You guessed the number right!")
  14.     end
  15. --to see the original script - see here: https://pastebin.com/M06fbgqD
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement