Advertisement
U_M9

Remote Explorer Works!

Jan 11th, 2018
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.25 KB | None | 0 0
  1. --//U_M9's Remote Explorer!
  2. --//https://discord.me/reh
  3.  
  4. local GameMeta = getrawmetatable(game)
  5. local GameNamecall = GameMeta.__namecall
  6. local RemoteCount = 0
  7.  
  8. if setreadonly then
  9.     setreadonly(GameMeta, false)
  10. end
  11.  
  12. local TableStorage = {
  13.    
  14.     EnabledEvents = {
  15.     ["Fire"] = true,
  16.     ["FireServer"] = true,
  17.     ["Invoke"] = true,
  18.     ["InvokeServer"] = true,
  19.     };
  20.    
  21.     Instances = {
  22.     ["FireServer"] = Instance.new("RemoteEvent").FireServer,
  23.     ["InvokeServer"] = Instance.new("RemoteFunction").InvokeServer,
  24.     ["Fire"] = Instance.new("BindableEvent").Fire,
  25.     ["Invoke"] = Instance.new("BindableFunction").Invoke,
  26. };
  27.     };
  28.  
  29.  
  30. function GetArguments(item)
  31.    if type(item) == "string" then
  32.        return "\""..item.."\""
  33.    elseif type(item) == "table" then
  34. local str = "{"
  35. local max = 0
  36. local numb = 1
  37.        for i,v in pairs(item) do
  38.            max = max+1
  39.        end
  40.        for i,v in pairs(item) do
  41.            if numb == max then
  42.                str = str.."["..GetArguments(i).."] = "..GetArguments(v)
  43.            else
  44.                str = str.."["..GetArguments(i).."] = "..GetArguments(v)..", "
  45.            end
  46.            numb = numb + 1
  47.        end
  48.        str = str.."}"
  49.        return str
  50.    elseif type(item) == "userdata" then
  51.       local a,b = pcall(function()
  52.       return item.ClassName
  53.        end)
  54.        if a then
  55.            return item:GetFullName()
  56.        else
  57.            if tostring(b):match("not a valid member of %w+") then
  58.                local c, d = tostring(b):match("not a valid member of %w+"):find("of ")
  59.                local class = tostring(b):match("not a valid member of %w+"):sub(d+1)
  60.                return class..".new(".. tostring(item) ..")"
  61.            end
  62.        end
  63.    else
  64.        return tostring(item)
  65.    end
  66. end
  67.  
  68.  
  69. GameMeta.__namecall = function (t, ...)
  70.    local args = {...}
  71.    local k = args[#args]
  72. if TableStorage.EnabledEvents[k] then
  73.            table.remove(args)
  74. RemoteCount = RemoteCount + 1
  75.            warn("\n [Remote Count : "..tostring(RemoteCount).."] \n [Event : "..k.."] \n [ClassName : "..t.ClassName.."] \n [Path : "..t:GetFullName().."] \n [Args : "..GetArguments(args).."]")
  76.            return TableStorage.Instances[k](t,...)
  77.    else
  78.        return GameNamecall(t,...)
  79.    end
  80. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement