Advertisement
Quoteory

Even better Serial Generator Lua

Sep 15th, 2019
282
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. local random = Random.new()
  2. local min, max = 999, 999999
  3.  
  4. function Serial:Generate(Inventory)
  5. local randomSerial
  6.  
  7. repeat
  8. randomSerial = tostring(random:NextInteger(min, max))
  9. until not Inventory[randomSerial]
  10.  
  11. return randomSerial
  12. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement