Advertisement
magnetos

Whitelist

Apr 16th, 2023 (edited)
963
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 10.80 KB | None | 0 0
  1. local Player = game:GetService("Players").LocalPlayer
  2.  
  3. local LFunctionList = {
  4.     [0] = syn.request
  5. }
  6.  
  7. local CFunctionList = {
  8.     [0] = {
  9.         f = pcall,
  10.         r = "missing argument #1",
  11.         c = true,
  12.         s = false
  13.     },
  14.     [1] = {
  15.         f = xpcall,
  16.         r = "missing argument #2 to 'xpcall' (function expected)",
  17.         c = true,
  18.         s = false
  19.     },
  20.     [2] = {
  21.         f = pcall,
  22.         r = "attempt to call a boolean value",
  23.         c = true,
  24.         s = false,
  25.         a = {function() end}
  26.     },
  27.     [3] = {
  28.         f = xpcall,
  29.         r = "attempt to call a boolean value",
  30.         c = true,
  31.         s = false,
  32.         a = {function() end, function() end}
  33.     },
  34.     [4] = {
  35.         f = syn.request,
  36.         r = "invalid argument #1 to '?' (table expected, got no value)",
  37.         c = true,
  38.         s = false
  39.     },
  40.     [5] = {
  41.         f = getconstants,
  42.         r = "invalid argument #1 to '?' (function or number expected)",
  43.         c = true,
  44.         s = false
  45.     },
  46.     [6] = {
  47.         f = getconstants,
  48.         r = "attempt to call a table value",
  49.         c = true,
  50.         s = false,
  51.         a = {function() end}
  52.     },
  53.     [7] = {
  54.         f = getconstants,
  55.         r = "attempt to call a table value",
  56.         c = true,
  57.         s = false,
  58.         a = {1}
  59.     },
  60.     [8] = {
  61.         f = string.byte,
  62.         r = "missing argument #1 to 'byte' (string expected)",
  63.         c = true,
  64.         s = false
  65.     },
  66.     [9] = {
  67.         f = function() end,
  68.         r = nil,
  69.         c = false,
  70.         s = true
  71.     },
  72.     [10] = {
  73.         f = function() return RS end,
  74.         r = RS,
  75.         c = false,
  76.         s = true
  77.     },
  78.     [11] = {
  79.         f = function() return false end,
  80.         r = false,
  81.         c = false,
  82.         s = true
  83.     },
  84.     [12] = {
  85.         f = function() return true end,
  86.         r = true,
  87.         c = false,
  88.         s = true
  89.     }
  90. }
  91.  
  92. local Increment = 0
  93. local Env = getfenv()
  94. local CPassed = false
  95. local LPassed = false
  96.  
  97. local GCI = 0;
  98. local SF = 0;
  99. local PCC = 0;
  100. local ALH = 0;
  101.  
  102. while true do
  103.     if not CFunctionList[Increment] and (Increment == #CFunctionList + 1) then
  104.         CPassed = true
  105.         break
  106.     end
  107.    
  108.     local Function = CFunctionList[Increment]["f"]
  109.     local Return = CFunctionList[Increment]["r"]
  110.     local ToBeCalled = CFunctionList[Increment]["c"]
  111.     local WillBeSuccessful = CFunctionList[Increment]["s"]
  112.     local Arguments = CFunctionList[Increment]["a"]
  113.        
  114.     if Arguments then
  115.         local Called =false
  116.            
  117.         setfenv(0, {tostring = function() while true do end end})
  118.            
  119.         xpcall(Function(unpack(Arguments)), function(Magnet)
  120.             Called = true
  121.                
  122.             if Magnet and Magnet ~= Return then
  123.                 return pcall(Player["Kick\0\0\0\0"], Player, "Magnet Tamper Protection - C_0x01 - " .. tostring(Increment))
  124.             end
  125.         end)
  126.            
  127.         setfenv(0, Env)
  128.            
  129.         if Called == false and ToBeCalled == true then
  130.             return pcall(Player["Kick\0\0\0\0"], Player, "Magnet Tamper Protection - C_0x02 - " .. tostring(Increment))
  131.         end
  132.            
  133.         Called = false
  134.            
  135.         setfenv(0, {tostring = function() while true do end end})
  136.            
  137.         local Success, Error = pcall(Function(unpack(Arguments)))
  138.            
  139.         if (not WillBeSuccessful == Success) or WillBeSuccessful ~= Success then
  140.             return pcall(Player["Kick\0\0\0\0"], Player, "Magnet Tamper Protection - C_0x03 - " .. tostring(Increment))
  141.         end
  142.            
  143.         setfenv(0, Env)
  144.            
  145.         if Error ~= Return then
  146.             return pcall(Player["Kick\0\0\0\0"], Player, "Magnet Tamper Protection - C_0x04 - " .. tostring(Increment))
  147.         end
  148.     else
  149.         Called = false
  150.            
  151.         setfenv(0, {tostring = function() while true do end end})
  152.            
  153.         xpcall(Function, function(Magnet2)
  154.            Called = true
  155.                
  156.            if Magnet2 and Magnet2 ~= Return then
  157.                return pcall(Player["Kick\0\0\0\0"], Player, "Magnet Tamper Protection - C_0x01 - " .. tostring(Increment))
  158.            end
  159.         end)
  160.        
  161.         setfenv(0, Env)
  162.            
  163.         if Called == false and ToBeCalled == true then
  164.             return pcall(Player["Kick\0\0\0\0"], Player, "Magnet Tamper Protection - C_0x02 - " .. tostring(Increment))
  165.         end
  166.            
  167.         Called = false
  168.            
  169.         setfenv(0, {tostring = function() while true do end end})
  170.            
  171.         local Success, Error = pcall(Function)
  172.            
  173.         if (not WillBeSuccessful == Success) or WillBeSuccessful ~= Success then
  174.             return pcall(Player["Kick\0\0\0\0"], Player, "Magnet Tamper Protection - C_0x03 - " .. tostring(Increment))
  175.         end
  176.            
  177.         setfenv(0, Env)
  178.            
  179.         if Error ~= Return then
  180.             return pcall(Player["Kick\0\0\0\0"], Player, "Magnet Tamper Protection - C_0x04 - " .. tostring(Increment))
  181.         end
  182.     end
  183.        
  184.     Increment = Increment + 1
  185. end
  186.  
  187. if CPassed == false then
  188.     return pcall(Player["Kick\0\0\0\0"], Player, "Magnet Tamper Protection - C_0x05")
  189. end
  190.  
  191. Increment = 0
  192.  
  193. while true do
  194.     if not LFunctionList[Increment] and (Increment == #LFunctionList + 1) then
  195.         LPassed = true
  196.         break;
  197.     end
  198.    
  199.     local Function = LFunctionList[Increment]
  200.  
  201.     local GCS1, GCS2 = debug.getconstants, getconstants
  202.     local GC1, GC2 = debug.getconstant, getconstant
  203.     local GI1, GI2 =  debug.getinfo, getinfo
  204.     local ICL1, ICL2 = islclosure, syn_islclosure
  205.     local GUVS1, GUVS2 = debug.getupvalues, getupvalues
  206.     local GUV1, GUV2 = debug.getupvalue, getupvalue
  207.    
  208.     local ConstantsCheck1, ConstantsCheck2 = pcall(function()
  209.         GCS1(Function)
  210.     end), pcall(function()
  211.         GCS2(Function)
  212.     end)
  213.    
  214.     if ConstantsCheck1 or ConstantsCheck2 then
  215.         return pcall(Player["Kick\0\0\0\0"], Player, "Magnet Tamper Protection - L_0x01")
  216.     end
  217.    
  218.     local ConstantCheck1, ConstantCheck2 = pcall(function()
  219.         GC1(Function, 1)
  220.     end), pcall(function()
  221.         GC2(Function, 1)
  222.     end)
  223.    
  224.     if ConstantCheck1 or ConstantCheck2 then
  225.         return pcall(Player["Kick\0\0\0\0"], Player, "Magnet Tamper Protection - L_0x01")
  226.     end
  227.    
  228.     local FSRC1, FSRC2 = GI1(function() end).source, GI2(function() end).source
  229.     local NCFSRC1, NCFSRC2 = GI1(newcclosure(function() end)).source, GI2(newcclosure(function() end)).source
  230.     local FS1, FS2 = GI1(Function).source, GI2(Function).source
  231.    
  232.     if (FS1 == FSRC1 or not (FS1 ~= FSRC1) or FS2 == FSRC1 or not (FS2 ~= FSRC1)) then
  233.         pcall(Player["Kick\0\0\0\0"], Player, "Magnet Tamper Protection - L_0x02")
  234.     end
  235.     if (FS1 == FSRC2 or not (FS1 ~= FSRC2) or FS2 == FSRC2 or not (FS2 ~= FSRC2)) then
  236.         pcall(Player["Kick\0\0\0\0"], Player, "Magnet Tamper Protection - L_0x03")
  237.     end
  238.     if (FS1 ~= NCFSRC2 or not (FS1 == NCFSRC2) or FS2 ~= NCFSRC2 or not (FS2 == NCFSRC2)) then
  239.         pcall(Player["Kick\0\0\0\0"], Player, "Magnet Tamper Protection - L_0x04")
  240.     end
  241.     if (FS1 ~= NCFSRC1 or not (FS1 == NCFSRC1) or FS2 ~= NCFSRC1 or not (FS2 == NCFSRC1)) then
  242.         pcall(Player["Kick\0\0\0\0"], Player, "Magnet Tamper Protection - L_0x05")
  243.     end
  244.    
  245.     local ILC1,ICL2 = ICL1(Function), ICL2(Function)
  246.    
  247.     if ILC1 or ILC2 then
  248.         pcall(Player["Kick\0\0\0\0"], Player, "Magnet Tamper Protection - L_0x06")
  249.     end
  250.  
  251.     local ValuesCheck1, ValuesCheck2 = GUVS1(Function), GUVS2(Function)
  252.    
  253.     if #ValuesCheck1 >= 2 or #ValuesCheck2 >= 2 then
  254.         pcall(Player["Kick\0\0\0\0"], Player, "Magnet Tamper Protection - L_0x07")
  255.     else
  256.         for i,v in pairs(ValuesCheck1) do
  257.             if type(v) ~= "userdata" then
  258.                 pcall(Player["Kick\0\0\0\0"], Player, "Magnet Tamper Protection - L_0x08")
  259.             end
  260.         end
  261.         for i,v in pairs(ValuesCheck2) do
  262.             if type(v) ~= "userdata" then
  263.                 pcall(Player["Kick\0\0\0\0"], Player, "Magnet Tamper Protection - L_0x09")
  264.             end
  265.         end
  266.     end
  267.  
  268.     local ValueCheck1, ValueCheck2 = GUV1(Function, 1),GUV2(Function, 1)
  269.    
  270.     if type(ValueCheck1) ~= "userdata" or type(ValueCheck2) ~= "userdata" then
  271.         pcall(Player["Kick\0\0\0\0"], Player, "Magnet Tamper Protection - L_0x10")
  272.     end
  273.  
  274.     Increment = Increment + 1
  275. end
  276.  
  277. if LPassed == false then
  278.     return pcall(Player["Kick\0\0\0\0"], Player, "Magnet Tamper Protection - L_0x11")
  279. end
  280.  
  281. local GCRegister = function(C)
  282.     if tostring(C) == 'hookfunction' then
  283.         ALH = ALH + 1
  284.        
  285.         if ALH >= 3 then
  286.             return pcall(Player["Kick\0\0\0\0"], Player, "Magnet Tamper Protection - L_0x12")
  287.         end
  288.     end
  289. end
  290.  
  291. while true do
  292.     GCI = GCI + 1
  293.    
  294.     local GCF = getgc()[GCI]
  295.     local FC = false
  296.    
  297.     if getgc()[GCI] == nil then
  298.         break
  299.     end
  300.    
  301.     if GCF and is_synapse_function(GCF) then
  302.         SF = SF + 1
  303.        
  304.         local CPC = pcall(function() getconstants(GCF) end)
  305.         local CPCD = pcall(function() debug.getconstants(GCF) end)
  306.        
  307.         if CPC or CPCD then
  308.             PCC = PCC + 1
  309.            
  310.             local GCC = 0
  311.            
  312.             while true do
  313.                 if #getconstants(GCF) == GCC or #getconstants(GCF) == GCC then break; end
  314.                
  315.                 GCC = GCC + 1
  316.                
  317.                 local C = CPC and getconstants(GCF)[GCC] or debug.getconstants(GCF)[GCC]
  318.                
  319.                 GCRegister(C)
  320.             end
  321.         end
  322.     end
  323. end
  324.  
  325. if SF < 300 then
  326.     return pcall(Player["Kick\0\0\0\0"], Player, "Magnet Tamper Protection - L_0x13")
  327. end
  328.  
  329. if GCI < 2000 then
  330.     return pcall(Player["Kick\0\0\0\0"], Player, "Magnet Tamper Protection - L_0x14")
  331. end
  332.  
  333. if PCC < 100 then
  334.     return pcall(Player["Kick\0\0\0\0"], Player, "Magnet Tamper Protection - L_0x15")
  335. end
  336.  
  337. local Whitelist = "https://whitelist.m9sked.repl.co"
  338.  
  339. local Request do
  340.     if syn and syn.request then
  341.         Request = syn.request
  342.     elseif http and http.request then
  343.         Request = request
  344.     elseif request then
  345.         Request = request
  346.     end
  347. end
  348.  
  349. local Headers = Request({Url = Whitelist, Method = "GET"})["Headers"]
  350. local IsWhitelisted, WhitelistMethod = Headers["Is-Whitelisted"], Headers["Whitelist-Method"]
  351. local WhitelistExists = Request({Url = Whitelist, Method = "POST", Headers = {whitelist = IsWhitelisted}})["Body"]
  352.  
  353. local Notification = loadstring(game:HttpGet("https://raw.githubusercontent.com/Jxereas/UI-Libraries/main/notification_gui_library.lua"))()
  354.  
  355. if WhitelistExists == "true" then
  356.     Notification.new("info", "Magnet's Whitelist", "Whitelisted!")
  357. else
  358.     Notification.new("info", "Magnet's Whitelist", "Not Whitelisted!")
  359. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement