-- enum helper function Enum(tbl) for i = 1, #tbl do local v = tbl[i] tbl[v] = i end return tbl end -- doesnt work function GetTerminalSize() io.write("\027[s") io.write("\027[9999;B") io.write("\027[9999;C") --io.write("\027[6n") io.write("\027[u") end EFFECT = Enum { "Normal", "Bold", "Dim", "Italic", "Underline", "BlinkSlow", "BlinkFast", "Invert", "Conceal", "CrossedOut" } COLOR = Enum { "Black", "Red", "Green", "Yellow", "Blue", "Purple", "Cyan", "LightGray", "Gray", "HighRed", "HighGreen", "HighYellow", "HighBlue", "HighPurple", "HighCyan", "White" } function TextEffect(Text, Effect) return "\027["..tostring(Effect-1).."m"..Text.."\027[0;m" end function TextBackground(Text, Color) return "\027[48;5;"..tostring(Color-1).."m"..Text.."\027[0;m" end function TextColor(Text, Color) return "\027[38;5;"..tostring(Color-1).."m"..Text.."\027[0;m" end