fork download
  1. local function ToByte( Code ) return Code:gsub( ".", function( Char ) return "\\" .. string.byte( Char ) end); end
  2. local function Random( V ) local a = ""; for i = V, math.random( V * 1, V * 3 ) do a = a .. " ".. ( "_" ):rep( i ) .."=_[\"".. ToByte( table.Random( { "RunStringEx", "DOF_Kill", "ColorToHSV", "DOFModeLHack", "AddOriginTpPVS", "AccessorFuncNW", "ErrorNoHalt", "GetTaskID", "LerpVector", "NewMesh", "PlayerDataUpdate", "STNDRD" } ) ) .. "\"]" end return a end
  3. local function Obfuscate( Code ) return "_=_G".. Random( 5 ) .."__=_[\"" .. ToByte( "string" ) .. "\"][\"" .. ToByte( "reverse" ) .. "\"]".. Random( 8 ) .."_[\"".. ToByte( "RunString" ) .. "\"](__\"" .. ToByte( Code:reverse() ) .. "\")".. Random( 5 ); end
  4.  
  5. local Code = [[print("Lol, hi!\nThis is my GLua obfuscator.")]];
  6. print( "--->>> " .. Code .. "\nObfuscated GLua code: \n" .. Obfuscate( Code ) .. "\nResult: \n" )
  7. _G["RunString"](Obfuscate( Code ))
Runtime error #stdin #stdout #stderr 0s 14120KB
stdin
Standard input is empty
stdout

Standard output is empty

stderr
lua5.3: prog.lua:2: attempt to call a nil value (field 'Random')
stack traceback:
	prog.lua:2: in upvalue 'Random'
	prog.lua:3: in local 'Obfuscate'
	prog.lua:6: in main chunk
	[C]: in ?