Advertisement
9551

Untitled

Jun 4th, 2022
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. local function uuid4()
  2. local random = math.random
  3. local template ='xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'
  4. return string.gsub(template, '[xy]', function (c)
  5. return string.format('%x', c == 'x' and random(0, 0xf) or random(8, 0xb))
  6. end)
  7. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement