Advertisement
Marty2000

[BETA] Flurace Lua Obfuscator

Apr 17th, 2024 (edited)
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.75 KB | None | 0 0
  1. function obfuscate(source,VarName,WaterMark)
  2.         local Variable = VarName
  3.         local WM
  4.  
  5.         if source == nil then
  6.             error("No script!")
  7.             return
  8.         end
  9.  
  10.         local ticks = tick()
  11.  
  12.         if typeof(WaterMark) == "string" and WaterMark ~= nil then
  13.             WM = "    "..tostring(WaterMark).." | Secure by Flurace"
  14.         else
  15.             WM = "    ".."AwesomeHub".." | Secure by Flurace"
  16.         end
  17.  
  18.         WM = "--[[".."\n".. tostring(WM) .."\n".."]]--".."\n\n"
  19.  
  20.         local random_ = function(length)
  21.             local letters = {"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"}
  22.             local code
  23.  
  24.             if math.random(1,2) == 1 then
  25.                 code = ""..letters[math.random(1,26)]
  26.             else
  27.                 code = ""..tostring(letters[math.random(1,26)]):upper()
  28.             end
  29.  
  30.             for i = 1, tonumber(length) do
  31.                 if math.random(1,2) == 1 then -- letters
  32.                     local get_letters = letters[math.random(1,26)]
  33.                     if math.random(1,2) == 1 then
  34.                         code = code..tostring(get_letters):upper()
  35.                     else
  36.                         code = code..tostring(get_letters)
  37.                     end
  38.                 else -- number
  39.                     code = code..tostring(math.random(0,9))
  40.                 end
  41.             end
  42.             return tostring(code)
  43.         end
  44.  
  45.         local StringToBinary = function(String)
  46.             local BinaryString = {}
  47.  
  48.             for i, Character in ipairs(String:split'') do
  49.                 local Binary = ""
  50.                 local Byte = Character:byte()
  51.                 while Byte > 0 do
  52.                     Binary = tostring(Byte % 2) .. Binary
  53.                     Byte = math.modf(Byte / 2)
  54.                 end
  55.                 table.insert(BinaryString, string.format("%.8d", Binary))
  56.             end
  57.  
  58.             return table.concat(BinaryString, " ")
  59.         end
  60.  
  61.         local add_binary = function(number, s)
  62.             local highest = 1
  63.  
  64.             local topic = {
  65.                 "Stop skidding!",
  66.                 "Bye World!",
  67.                 "Haxi.",
  68.                 "Stop using 77fuscator.",
  69.                 "LOO0O00O000OO0L?",
  70.                 "Bobux generator$$$.",
  71.                 "OxionTech",
  72.                 "Best of the best!",
  73.                 "Poop<3",
  74.                 random_(math.random(50,150)),
  75.             }
  76.  
  77.             for i,v in pairs(topic) do
  78.                 if i > highest then
  79.                     highest = i
  80.                 end
  81.             end
  82.  
  83.             for i = 1, tonumber(number) do
  84.                 local str = [[local ]]..Variable..tostring(random_(math.random(10,12)))..[[ = ]]..'"'..StringToBinary(tostring(topic[math.random(1, tonumber(highest))]))..'"'.."; "
  85.                 s = s..str
  86.             end
  87.  
  88.                 return tostring(s)
  89.             end
  90.  
  91.         local Random_Variable = {
  92.             TableByte = random_(math.random(15,20)),
  93.             Table_concat = random_(math.random(15,20)),
  94.             Loadstring = random_(math.random(15,20)),
  95.         }
  96.  
  97.         local troll_func = [[function() ]]..add_binary(math.random(30,50), "")..[[ end]]
  98.         local troll_var = [[local ]]..Variable..tostring(random_(math.random(15,20)))..[[ = ]]..troll_func
  99.  
  100.         local SourceByte = ""
  101.         for i = 1,string.len(source) do SourceByte = SourceByte..'"\\'..string.byte(source, i)..'", ' end
  102.         local TableByte = [[local ]]..Variable..tostring(Random_Variable.TableByte)..[[ = {]]..SourceByte..[[}]]
  103.         local Loadstring = [[local ]]..Variable..tostring(Random_Variable.Loadstring)..[[ = loadstring(table.concat({"\114", "\101", "\116", "\117", "\114", "\110", "\32", "\102", "\117", "\110", "\99", "\116", "\105", "\111", "\110", "\40", "\98", "\121", "\116", "\101", "\41", "\10", "\32", "\32", "\32", "\32", "\105", "\102", "\32", "\116", "\121", "\112", "\101", "\111", "\102", "\40", "\98", "\121", "\116", "\101", "\41", "\32", "\61", "\61", "\32", "\34", "\116", "\97", "\98", "\108", "\101", "\34", "\32", "\116", "\104", "\101", "\110", "\10", "\32", "\32", "\32", "\32", "\32", "\32", "\32", "\32", "\108", "\111", "\97", "\100", "\115", "\116", "\114", "\105", "\110", "\103", "\40", "\116", "\97", "\98", "\108", "\101", "\46", "\99", "\111", "\110", "\99", "\97", "\116", "\40", "\98", "\121", "\116", "\101", "\41", "\41", "\40", "\41", "\10", "\32", "\32", "\32", "\32", "\101", "\108", "\115", "\101", "\10", "\32", "\32", "\32", "\32", "\32", "\32", "\32", "\32", "\98", "\121", "\116", "\101", "\32", "\61", "\32", "\123", "\98", "\121", "\116", "\101", "\125", "\10", "\32", "\32", "\32", "\32", "\32", "\32", "\32", "\32", "\108", "\111", "\97", "\100", "\115", "\116", "\114", "\105", "\110", "\103", "\40", "\116", "\97", "\98", "\108", "\101", "\46", "\99", "\111", "\110", "\99", "\97", "\116", "\40", "\98", "\121", "\116", "\101", "\41", "\41", "\40", "\41", "\10", "\32", "\32", "\32", "\32", "\101", "\110", "\100", "\10", "\101", "\110", "\100", "\10",}))()]]
  104.         local func = {
  105.             [1] = Variable..tostring(Random_Variable.Loadstring),
  106.             [2] = Variable..tostring(Random_Variable.TableByte),
  107.         }
  108.  
  109.         local fake_code = function(number,r)
  110.             local t = {}
  111.                 for i = 1, tonumber(number) do
  112.                     local create_Var = Variable..tostring(random_(math.random(15,20)))
  113.                     local random
  114.  
  115.                     if r ~= nil then
  116.                         random = "return "..tostring(random_(tonumber(r)))
  117.                     else
  118.                         random = "return "..tostring(random_(math.clamp(1000, string.len(source) / 2, string.len(source))))
  119.                     end
  120.  
  121.                     local byte = ""
  122.                     for x = 1,string.len(random) do byte = byte..'"\\'..string.byte(random, x)..'", ' end
  123.                     local fake = [[local ]]..create_Var..[[ = {]]..byte..[[}; ]]..[[local ]]..create_Var.." = "..func[1]..[[(]]..create_Var..[[); ]]
  124.                     table.insert(t,fake)
  125.                 end
  126.  
  127.                 return unpack(t)
  128.             end
  129.  
  130.         local obfuscated = WM..troll_var.."; "..Loadstring.."; "..fake_code(math.random(2,4), math.random(400,600))..TableByte.."; "..[[local ]]..Variable..tostring(random_(math.random(15,20))).." = "..func[1].."("..func[2]..")".."; "..fake_code(math.random(2,4), math.random(string.len(source) / 2, string.len(source) * 2))
  131.         setclipboard(obfuscated)
  132.         warn("Done obfuscate in "..tostring(tick() - ticks).." second")
  133.     return
  134. end
  135.  
  136. --// Module
  137. return function(source,CustomVarName,WaterMark)
  138.     task.spawn(function()
  139.         obfuscate(source,CustomVarName,WaterMark)
  140.     end)
  141. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement