This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Creating text | |
--- Call the function `site:text(text: string, style?: table) to draw text. | |
-- Putting custom text styles | |
--- Call 'site:text' with the second parameter ('style') with a table full of styles you want. | |
-- Text Styles | |
--- center: boolean | Centers the text. | |
--- foregroundColor: integer | Foreground color of the text. | |
--- backgroundColor: integer | Background color of the text. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local random = math.random | |
local function uuid() | |
local template ='xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx' | |
return string.gsub(template, '[xy]', function (c) | |
local v = (c == 'x') and random(0, 0xf) or random(8, 0xb) | |
return string.format('%x', v) | |
end) | |
end |