Meliodas0_0

Lua obfucator

Jan 12th, 2020
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. -- By Sikke
  2.  
  3. local Script = [[print("hi")]] -- < Put script here
  4.  
  5. --
  6.  
  7. function Encode(Text)
  8. Text = tostring(Text)
  9. local Table = {}
  10. for i = 1, #Text do
  11. local T = Text:sub(i, i)
  12. table.insert(Table, T)
  13. end
  14. local T = {}
  15. local MyText = "'"
  16. for i, v in pairs(Table) do
  17. local Key = string.byte(v)
  18. MyText = MyText..math.floor(Key/128)
  19. Key = Key % 128
  20. MyText = MyText..math.floor(Key/64)
  21. Key = Key % 64
  22. MyText = MyText..math.floor(Key/32)
  23. Key = Key % 32
  24. MyText = MyText..math.floor(Key/16)
  25. Key = Key % 16
  26. MyText = MyText..math.floor(Key/8)
  27. Key = Key % 8
  28. MyText = MyText..math.floor(Key/4)
  29. Key = Key % 4
  30. MyText = MyText..math.floor(Key/2)
  31. Key = Key % 2
  32. MyText = MyText..math.floor(Key/1)
  33. Key = Key % 1
  34. MyText=MyText.."','"
  35. end
  36. MyText = MyText:sub(1, #MyText -1)
  37. if tonumber(MyText) then
  38. MyText = tonumber(MyText)
  39. end
  40. return MyText
  41. end
  42. -- ENCODE
  43. local Encoded = Encode(Script)
  44. print([[local BinaryEncrypted = ]].."table.concat({"..Encoded.."})"..[[ function decode(str) local function binary_to_string(bin) return string.char(tonumber(bin, 2));end;return (str:gsub("(".. ("[01]"):rep(8) .. ")", binary_to_string));end;local Binary = BinaryEncrypted _G.EncodedBinary = decode(Binary);loadstring(_G.EncodedBinary)()]])
Add Comment
Please, Sign In to add comment