function ROT13() local sel = editor:GetSelText(); local length = string.len(sel); local itt = 1; local tempChar; local tempString = ""; while itt < length+1 do tempChar = string.sub(sel,itt,itt); if (tempChar >= "a" and tempChar <= "m") or (tempChar >= "A" and tempChar <= "M") then local x = string.byte(tempChar); local y = string.char(x+13); tempString = tempString .. y; elseif (tempChar >= "n" and tempChar <= "z") or (tempChar >= "N" and tempChar <= "Z") then local x = string.byte(tempChar); local y = string.char(x-13); tempString = tempString .. y; else tempString = tempString .. tempChar; end itt=itt+1; end editor:ReplaceSel(tempString); end