Meliodas0_0

lua obfucation

Aug 3rd, 2019
108
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local Script = [[print("hi")]] -- < Put script here
  2.  
  3. function Encode(Text)
  4. Text = tostring(Text)
  5. local Table = {}
  6. for i = 1, #Text do
  7. local T = Text:sub(i, i)
  8. table.insert(Table, T)
  9. end
  10. local T = {}
  11. local MyText = "'"
  12. for i, v in pairs(Table) do
  13. local Key = string.byte(v)
  14. MyText = MyText..math.floor(Key/128)
  15. Key = Key % 128
  16. MyText = MyText..math.floor(Key/64)
  17. Key = Key % 64
  18. MyText = MyText..math.floor(Key/32)
  19. Key = Key % 32
  20. MyText = MyText..math.floor(Key/16)
  21. Key = Key % 16
  22. MyText = MyText..math.floor(Key/8)
  23. Key = Key % 8
  24. MyText = MyText..math.floor(Key/4)
  25. Key = Key % 4
  26. MyText = MyText..math.floor(Key/2)
  27. Key = Key % 2
  28. MyText = MyText..math.floor(Key/1)
  29. Key = Key % 1
  30. MyText=MyText.."','"
  31. end
  32. MyText = MyText:sub(1, #MyText -1)
  33. if tonumber(MyText) then
  34. MyText = tonumber(MyText)
  35. end
  36. return MyText
  37. end
  38. -- ENCODE
  39. local Encoded = Encode(Script)
  40. 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)()]])
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×