Advertisement
DiscordWhitelisting

RemoteConversion

Sep 23rd, 2018
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.66 KB | None | 0 0
  1. --//Yeet RemoteConversion | Peepx0\\--
  2.  
  3. -- Instances:
  4. local ScreenGui = Instance.new("ScreenGui")
  5. local Frame = Instance.new("Frame")
  6. local Frame_2 = Instance.new("Frame")
  7. local TextLabel = Instance.new("TextLabel")
  8. local Frame_3 = Instance.new("Frame")
  9. local Script = Instance.new("TextBox")
  10. local Execute = Instance.new("TextButton")
  11. local Clear = Instance.new("TextButton")
  12. local Copy = Instance.new("TextButton")
  13. --Properties:
  14. ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  15.  
  16. Frame.Parent = ScreenGui
  17. Frame.BackgroundColor3 = Color3.new(0.129412, 0.129412, 0.129412)
  18. Frame.BorderColor3 = Color3.new(0.129412, 0.129412, 0.129412)
  19. Frame.Position = UDim2.new(0.0785340294, 0, 0.330316752, 0)
  20. Frame.Size = UDim2.new(0, 503, 0, 338)
  21. Frame.Draggable = true; --Frame is draggable;
  22. Frame.Active = true; --Frame is active;
  23. Frame.Selectable = true; --Frame is selectable;
  24.  
  25. Frame_2.Parent = Frame
  26. Frame_2.BackgroundColor3 = Color3.new(0.172549, 0.172549, 0.172549)
  27. Frame_2.BorderColor3 = Color3.new(0.172549, 0.172549, 0.172549)
  28. Frame_2.Size = UDim2.new(0, 503, 0, 64)
  29.  
  30. TextLabel.Parent = Frame_2
  31. TextLabel.BackgroundColor3 = Color3.new(1, 1, 1)
  32. TextLabel.BackgroundTransparency = 1
  33. TextLabel.Position = UDim2.new(0.0139165008, 0, 0, 0)
  34. TextLabel.Size = UDim2.new(0, 285, 0, 64)
  35. TextLabel.Font = Enum.Font.SourceSansLight
  36. TextLabel.Text = "RemoteConversion"
  37. TextLabel.TextColor3 = Color3.new(1, 1, 1)
  38. TextLabel.TextSize = 43
  39. TextLabel.TextWrapped = true
  40. TextLabel.TextXAlignment = Enum.TextXAlignment.Left
  41.  
  42. Frame_3.Parent = Frame
  43. Frame_3.BackgroundColor3 = Color3.new(0.164706, 0.164706, 0.164706)
  44. Frame_3.BorderColor3 = Color3.new(0.164706, 0.164706, 0.164706)
  45. Frame_3.Position = UDim2.new(0.0278329998, 0, 0.236686394, 0)
  46. Frame_3.Size = UDim2.new(0, 475, 0, 202)
  47.  
  48. Script.Name = "Script"
  49. Script.Parent = Frame_3
  50. Script.BackgroundColor3 = Color3.new(1, 1, 1)
  51. Script.BackgroundTransparency = 1
  52. Script.Position = UDim2.new(0.0231578946, 0, 0.0346534662, 0)
  53. Script.Size = UDim2.new(0, 458, 0, 189)
  54. Script.Font = Enum.Font.SourceSans
  55. Script.Text = "--Script--"
  56. Script.TextColor3 = Color3.new(1, 1, 1)
  57. Script.TextSize = 26
  58. Script.TextXAlignment = Enum.TextXAlignment.Left
  59. Script.TextYAlignment = Enum.TextYAlignment.Top
  60.  
  61. Execute.Name = "Execute"
  62. Execute.Parent = Frame
  63. Execute.BackgroundColor3 = Color3.new(0.172549, 0.172549, 0.172549)
  64. Execute.BorderColor3 = Color3.new(0.172549, 0.172549, 0.172549)
  65. Execute.Position = UDim2.new(0.0278330017, 0, 0.866863906, 0)
  66. Execute.Size = UDim2.new(0, 112, 0, 35)
  67. Execute.Font = Enum.Font.SourceSansLight
  68. Execute.Text = "Execute"
  69. Execute.TextColor3 = Color3.new(1, 1, 1)
  70. Execute.TextScaled = true
  71. Execute.TextSize = 14
  72. Execute.TextWrapped = true
  73. Execute.TextXAlignment = Enum.TextXAlignment.Left
  74.  
  75. Clear.Name = "Clear"
  76. Clear.Parent = Frame
  77. Clear.BackgroundColor3 = Color3.new(0.172549, 0.172549, 0.172549)
  78. Clear.BorderColor3 = Color3.new(0.172549, 0.172549, 0.172549)
  79. Clear.Position = UDim2.new(0.272365808, 0, 0.866863906, 0)
  80. Clear.Size = UDim2.new(0, 112, 0, 35)
  81. Clear.Font = Enum.Font.SourceSansLight
  82. Clear.Text = "Clear"
  83. Clear.TextColor3 = Color3.new(1, 1, 1)
  84. Clear.TextScaled = true
  85. Clear.TextSize = 14
  86. Clear.TextWrapped = true
  87. Clear.TextXAlignment = Enum.TextXAlignment.Left
  88.  
  89. Copy.Name = "Copy"
  90. Copy.Parent = Frame
  91. Copy.BackgroundColor3 = Color3.new(0.172549, 0.172549, 0.172549)
  92. Copy.BorderColor3 = Color3.new(0.172549, 0.172549, 0.172549)
  93. Copy.Position = UDim2.new(0.516898692, 0, 0.866863906, 0)
  94. Copy.Size = UDim2.new(0, 112, 0, 35)
  95. Copy.Font = Enum.Font.SourceSansLight
  96. Copy.Text = "Copy"
  97. Copy.TextColor3 = Color3.new(1, 1, 1)
  98. Copy.TextScaled = true
  99. Copy.TextSize = 14
  100. Copy.TextWrapped = true
  101. Copy.TextXAlignment = Enum.TextXAlignment.Left
  102. -- Scripts:
  103. --//Lets just get the easy bits over with...
  104. Clear.MouseButton1Down:connect(function()
  105.     Script.Text = ""; --Clears the textbox;
  106. end)
  107. Copy.MouseButton1Down:connect(function()
  108.     setclipboard(Script.Text); --Copies the script;
  109. end)
  110. Execute.MouseButton1Down:connect(function()
  111.     loadstring(Script.Text)() --Gets the function loadstring returns and calls it.
  112. end)
  113. --//Making things work.exe
  114. local game_mt = getrawmetatable(game);
  115. local old_namecall = game_mt.__namecall;
  116. setreadonly(game_mt,false);
  117. --//The main juicy shitttt
  118. local function formatArguments(args)
  119.     local return_string = "";
  120.     for i,v in next, args do
  121.         if type(v) == "string" then
  122.             local index = i - 1;
  123.             return_string = return_string.."local ARGUMENT_"..index.." = '"..tostring(v).."';\n";
  124.         elseif type(v) == "number" then
  125.             local index = i - 1;
  126.             return_string = return_string.."local ARGUMENT_"..index.." = "..tonumber(v)..";\n";
  127.         elseif type(v) == "boolean" then
  128.             local index = i - 1;
  129.             return_string = return_string.."local ARGUMENT_"..index.." = "..v..";\n";
  130.         elseif type(v) == "table" then
  131.             for _,v in next, v do
  132.                 local index = i - 1
  133.                 return_string = return_string.."local ARGUMENT_"..index.." = "..v..";\n";
  134.             end
  135.         end;
  136.     end;
  137.     return return_string;
  138. end;
  139. local function formatArgumentsLength(args)
  140.     local return_string = "";
  141.     local seperate = "";
  142.     if #args > 1 then
  143.         seperate = ",";
  144.     end
  145.     for i,v in next, args do
  146.         if type(v) == "string" then
  147.             local index = i - 1;
  148.             if i == #args then
  149.                 seperate = "";
  150.             end;
  151.             return_string = return_string.."ARGUMENT_"..index..seperate;
  152.         elseif type(v) == "number" then
  153.             local index = i - 1;
  154.             if i == #args then
  155.                 seperate = "";
  156.             end;
  157.             return_string = return_string.."ARGUMENT_"..index..seperate;
  158.         elseif type(v) == "boolean" then
  159.             local index = i - 1;
  160.             if i == #args then
  161.                 seperate = "";
  162.             end;
  163.             return_string = return_string.."ARGUMENT_"..index..seperate;
  164.         elseif type(v) == "table" then
  165.             for _,v in next, v do
  166.                 local index = i - 1;
  167.                 if i == #args then
  168.                     seperate = "";
  169.                 end;
  170.                 return_string = return_string.."ARGUMENT_"..index..seperate;
  171.             end
  172.         end;
  173.     end;
  174.     return return_string;
  175. end;
  176. --Time for detecting remotes <3
  177. game_mt.__namecall = function(...)
  178.     local args = {...};
  179.     local method = args[#args];
  180.     if method == "FireServer" or method == "InvokeServer" then
  181.         table.remove(args,#args);
  182.         Script.Text = [[local REMOTE_PATH = game.]]..args[1]:GetFullName().."\n";
  183.         table.remove(args,1);
  184.         Script.Text = Script.Text..formatArguments(args).."REMOTE_PATH:"..method.."("..formatArgumentsLength(args)..");";
  185.     end
  186.     return old_namecall(...);
  187. end
  188. warn("Loaded RemoteConversion.");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement