This file contains 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
eeeee |
This file contains 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
function fromhex(str) return (str:gsub('..', function (cc) return string.char(tonumber(cc, 16)) end)) end | |
function tohex(str) return (str:gsub('.', function (c) return string.format('%02X', string.byte(c))end)) end |
This file contains 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
--[=[see https://discord.com/channels/477910221872824320/477911902152949771/966486623921508392 ]=] | |
local function checkForTerm | |
(_,...)_=...==_..'' | |
and error("Terminated", 0) return ... | |
end | |
function os.pullEvent(...) | |
return checkForTerm("terminate", coroutine.yield(...)) | |
end |