Advertisement
ExecutorForALLdomain

Hookmetamethod

Nov 2nd, 2024 (edited)
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 14.64 KB | None | 0 0
  1. -- Gui to Lua
  2. -- Version: 3.2
  3.  
  4. -- Instances:
  5.  
  6. local metamethod = Instance.new("ScreenGui")
  7. local TextLabel = Instance.new("TextLabel")
  8. local Frame = Instance.new("Frame")
  9. local SUMBIT = Instance.new("TextButton")
  10. local ScrollingFrame = Instance.new("ScrollingFrame")
  11. local x = Instance.new("TextButton")
  12. local TextLabel_2 = Instance.new("TextLabel")
  13. local SEEVALUE = Instance.new("TextButton")
  14. local changevalue = Instance.new("TextButton")
  15. local rat = Instance.new("Frame")
  16. local ScrollingFrame_2 = Instance.new("ScrollingFrame")
  17. local TextBox = Instance.new("TextBox")
  18. local GoBACK = Instance.new("TextButton")
  19. local CopyScript = Instance.new("TextButton")
  20. local changeinvokedawg = Instance.new("Frame")
  21. local ScrollingFrame_3 = Instance.new("ScrollingFrame")
  22. local TextBox_2 = Instance.new("TextBox")
  23. local back = Instance.new("TextButton")
  24. local Clear = Instance.new("TextButton")
  25.  
  26. --Properties:
  27.  
  28. metamethod.Name = "metamethod"
  29. metamethod.Parent = game:GetService("CoreGui")
  30. metamethod.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  31. metamethod.DisplayOrder = 1566666666
  32. metamethod.ResetOnSpawn = false
  33.  
  34. TextLabel.Parent = metamethod
  35. TextLabel.BackgroundColor3 = Color3.fromRGB(33, 33, 33)
  36. TextLabel.BorderColor3 = Color3.fromRGB(0, 0, 0)
  37. TextLabel.BorderSizePixel = 0
  38. TextLabel.Position = UDim2.new(0.170283809, 0, 0.196277469, 0)
  39. TextLabel.Size = UDim2.new(0, 760, 0, 23)
  40. TextLabel.Font = Enum.Font.SourceSans
  41. TextLabel.Text = "Hookmetamethod"
  42. TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  43. TextLabel.TextSize = 14.000
  44.  
  45. Frame.Parent = TextLabel
  46. Frame.BackgroundColor3 = Color3.fromRGB(56, 56, 56)
  47. Frame.BorderColor3 = Color3.fromRGB(0, 0, 0)
  48. Frame.BorderSizePixel = 0
  49. Frame.Position = UDim2.new(0, 0, 0.956522405, 0)
  50. Frame.Size = UDim2.new(0, 760, 0, 314)
  51.  
  52. SUMBIT.Name = "SUMBIT"
  53. SUMBIT.Parent = Frame
  54. SUMBIT.BackgroundColor3 = Color3.fromRGB(43, 43, 43)
  55. SUMBIT.BorderColor3 = Color3.fromRGB(0, 0, 0)
  56. SUMBIT.BorderSizePixel = 0
  57. SUMBIT.Position = UDim2.new(0.0273978375, 0, 0.864725471, 0)
  58. SUMBIT.Size = UDim2.new(0, 248, 0, 28)
  59. SUMBIT.Font = Enum.Font.Cartoon
  60. SUMBIT.Text = "SUMBIT"
  61. SUMBIT.TextColor3 = Color3.fromRGB(255, 255, 255)
  62. SUMBIT.TextSize = 14.000
  63.  
  64. ScrollingFrame.Parent = Frame
  65. ScrollingFrame.Active = true
  66. ScrollingFrame.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
  67. ScrollingFrame.BorderColor3 = Color3.fromRGB(0, 0, 0)
  68. ScrollingFrame.BorderSizePixel = 0
  69. ScrollingFrame.Position = UDim2.new(0.0157894734, 0, 0.0286624208, 0)
  70. ScrollingFrame.Size = UDim2.new(0, 738, 0, 206)
  71.  
  72. x.Name = "x"
  73. x.Parent = ScrollingFrame
  74. x.BackgroundColor3 = Color3.fromRGB(15, 15, 15)
  75. x.BorderColor3 = Color3.fromRGB(0, 0, 0)
  76. x.BorderSizePixel = 0
  77. x.Size = UDim2.new(0, 738, 0, 14)
  78. x.Font = Enum.Font.SourceSans
  79. x.Text = "example"
  80. x.TextColor3 = Color3.fromRGB(255, 255, 255)
  81. x.TextSize = 14.000
  82.  
  83. TextLabel_2.Parent = Frame
  84. TextLabel_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  85. TextLabel_2.BackgroundTransparency = 1.000
  86. TextLabel_2.BorderColor3 = Color3.fromRGB(0, 0, 0)
  87. TextLabel_2.BorderSizePixel = 0
  88. TextLabel_2.Position = UDim2.new(0.0263157897, 0, 0.707006395, 0)
  89. TextLabel_2.Size = UDim2.new(0, 730, 0, 23)
  90. TextLabel_2.Font = Enum.Font.SourceSans
  91. TextLabel_2.Text = "Selected RemoteFunction : "
  92. TextLabel_2.TextColor3 = Color3.fromRGB(255, 255, 255)
  93. TextLabel_2.TextSize = 14.000
  94. TextLabel_2.TextWrapped = true
  95.  
  96. SEEVALUE.Name = "SEEVALUE"
  97. SEEVALUE.Parent = Frame
  98. SEEVALUE.BackgroundColor3 = Color3.fromRGB(43, 43, 43)
  99. SEEVALUE.BorderColor3 = Color3.fromRGB(0, 0, 0)
  100. SEEVALUE.BorderSizePixel = 0
  101. SEEVALUE.Position = UDim2.new(0.353713661, 0, 0.864725471, 0)
  102. SEEVALUE.Size = UDim2.new(0, 250, 0, 28)
  103. SEEVALUE.Font = Enum.Font.Cartoon
  104. SEEVALUE.Text = "See Returned Value"
  105. SEEVALUE.TextColor3 = Color3.fromRGB(255, 255, 255)
  106. SEEVALUE.TextSize = 14.000
  107.  
  108. changevalue.Name = "changevalue"
  109. changevalue.Parent = Frame
  110. changevalue.BackgroundColor3 = Color3.fromRGB(43, 43, 43)
  111. changevalue.BorderColor3 = Color3.fromRGB(0, 0, 0)
  112. changevalue.BorderSizePixel = 0
  113. changevalue.Position = UDim2.new(0.682661057, 0, 0.864725471, 0)
  114. changevalue.Size = UDim2.new(0, 231, 0, 28)
  115. changevalue.Font = Enum.Font.Cartoon
  116. changevalue.Text = "Change Value Frame"
  117. changevalue.TextColor3 = Color3.fromRGB(255, 255, 255)
  118. changevalue.TextSize = 14.000
  119.  
  120. rat.Name = "rat"
  121. rat.Parent = TextLabel
  122. rat.BackgroundColor3 = Color3.fromRGB(56, 56, 56)
  123. rat.BorderColor3 = Color3.fromRGB(0, 0, 0)
  124. rat.BorderSizePixel = 0
  125. rat.Position = UDim2.new(0, 0, 1.00000072, 0)
  126. rat.Size = UDim2.new(0, 760, 0, 313)
  127. rat.Visible = false
  128.  
  129. ScrollingFrame_2.Parent = rat
  130. ScrollingFrame_2.Active = true
  131. ScrollingFrame_2.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
  132. ScrollingFrame_2.BorderColor3 = Color3.fromRGB(0, 0, 0)
  133. ScrollingFrame_2.BorderSizePixel = 0
  134. ScrollingFrame_2.Position = UDim2.new(0.0105263162, 0, 0.0223642178, 0)
  135. ScrollingFrame_2.Size = UDim2.new(0, 744, 0, 270)
  136.  
  137. TextBox.Parent = ScrollingFrame_2
  138. TextBox.BackgroundColor3 = Color3.fromRGB(15, 15, 15)
  139. TextBox.BorderColor3 = Color3.fromRGB(0, 0, 0)
  140. TextBox.BorderSizePixel = 0
  141. TextBox.Position = UDim2.new(0.0107526882, 0, 1.54129182e-07, 0)
  142. TextBox.Size = UDim2.new(0, 735, 0, 900)
  143. TextBox.ClearTextOnFocus = false
  144. TextBox.Font = Enum.Font.SourceSans
  145. TextBox.MultiLine = true
  146. TextBox.Text = ""
  147. TextBox.TextColor3 = Color3.fromRGB(255, 255, 255)
  148. TextBox.TextSize = 14.000
  149. TextBox.TextXAlignment = Enum.TextXAlignment.Left
  150. TextBox.TextYAlignment = Enum.TextYAlignment.Top
  151.  
  152. GoBACK.Name = "GoBACK"
  153. GoBACK.Parent = rat
  154. GoBACK.BackgroundColor3 = Color3.fromRGB(43, 43, 43)
  155. GoBACK.BorderColor3 = Color3.fromRGB(0, 0, 0)
  156. GoBACK.BorderSizePixel = 0
  157. GoBACK.Position = UDim2.new(0.020818932, 0, 0.906269193, 0)
  158. GoBACK.Size = UDim2.new(0, 248, 0, 21)
  159. GoBACK.Font = Enum.Font.Cartoon
  160. GoBACK.Text = "Go Back"
  161. GoBACK.TextColor3 = Color3.fromRGB(255, 255, 255)
  162. GoBACK.TextSize = 14.000
  163.  
  164. CopyScript.Name = "CopyScript"
  165. CopyScript.Parent = rat
  166. CopyScript.BackgroundColor3 = Color3.fromRGB(43, 43, 43)
  167. CopyScript.BorderColor3 = Color3.fromRGB(0, 0, 0)
  168. CopyScript.BorderSizePixel = 0
  169. CopyScript.Position = UDim2.new(0.365555763, 0, 0.906269193, 0)
  170. CopyScript.Size = UDim2.new(0, 248, 0, 21)
  171. CopyScript.Font = Enum.Font.Cartoon
  172. CopyScript.Text = "Copy Script"
  173. CopyScript.TextColor3 = Color3.fromRGB(255, 255, 255)
  174. CopyScript.TextSize = 14.000
  175.  
  176. changeinvokedawg.Name = "changeinvokedawg"
  177. changeinvokedawg.Parent = TextLabel
  178. changeinvokedawg.BackgroundColor3 = Color3.fromRGB(56, 56, 56)
  179. changeinvokedawg.BorderColor3 = Color3.fromRGB(0, 0, 0)
  180. changeinvokedawg.BorderSizePixel = 0
  181. changeinvokedawg.Position = UDim2.new(0, 0, 1.00000072, 0)
  182. changeinvokedawg.Size = UDim2.new(0, 760, 0, 313)
  183. changeinvokedawg.Visible = false
  184.  
  185. ScrollingFrame_3.Parent = changeinvokedawg
  186. ScrollingFrame_3.Active = true
  187. ScrollingFrame_3.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
  188. ScrollingFrame_3.BorderColor3 = Color3.fromRGB(0, 0, 0)
  189. ScrollingFrame_3.BorderSizePixel = 0
  190. ScrollingFrame_3.Position = UDim2.new(0.0157894734, 0, 0.0319488831, 0)
  191. ScrollingFrame_3.Size = UDim2.new(0, 733, 0, 257)
  192.  
  193. TextBox_2.Parent = ScrollingFrame_3
  194. TextBox_2.BackgroundColor3 = Color3.fromRGB(15, 15, 15)
  195. TextBox_2.BorderColor3 = Color3.fromRGB(0, 0, 0)
  196. TextBox_2.BorderSizePixel = 0
  197. TextBox_2.Position = UDim2.new(0, 0, -5.73638701e-08, 0)
  198. TextBox_2.Size = UDim2.new(0, 733, 0, 900)
  199. TextBox_2.ClearTextOnFocus = false
  200. TextBox_2.Font = Enum.Font.SourceSans
  201. TextBox_2.MultiLine = true
  202. TextBox_2.PlaceholderText = "-- TYPE HERE YOUR VALUE YOU WANNA CHANGE THEN GO BACK THEN CLICK SUMBIT ASAP!!"
  203. TextBox_2.Text = ""
  204. TextBox_2.TextColor3 = Color3.fromRGB(255, 255, 255)
  205. TextBox_2.TextSize = 14.000
  206. TextBox_2.TextXAlignment = Enum.TextXAlignment.Left
  207. TextBox_2.TextYAlignment = Enum.TextYAlignment.Top
  208.  
  209. back.Name = "back"
  210. back.Parent = changeinvokedawg
  211. back.BackgroundColor3 = Color3.fromRGB(43, 43, 43)
  212. back.BorderColor3 = Color3.fromRGB(0, 0, 0)
  213. back.BorderSizePixel = 0
  214. back.Position = UDim2.new(0.0155557729, 0, 0.883904994, 0)
  215. back.Size = UDim2.new(0, 248, 0, 28)
  216. back.Font = Enum.Font.Cartoon
  217. back.Text = "Go Back"
  218. back.TextColor3 = Color3.fromRGB(255, 255, 255)
  219. back.TextSize = 14.000
  220.  
  221. Clear.Name = "Clear"
  222. Clear.Parent = changeinvokedawg
  223. Clear.BackgroundColor3 = Color3.fromRGB(43, 43, 43)
  224. Clear.BorderColor3 = Color3.fromRGB(0, 0, 0)
  225. Clear.BorderSizePixel = 0
  226. Clear.Position = UDim2.new(0.653713644, 0, 0.883904994, 0)
  227. Clear.Size = UDim2.new(0, 248, 0, 28)
  228. Clear.Font = Enum.Font.Cartoon
  229. Clear.Text = "Clear TextBox"
  230. Clear.TextColor3 = Color3.fromRGB(255, 255, 255)
  231. Clear.TextSize = 14.000
  232.  
  233. -- Scripts:
  234.  
  235. local function YOSEWZT_fake_script() -- Frame.LocalScript
  236.     local script = Instance.new('LocalScript', Frame)
  237.  
  238.    
  239. end
  240. coroutine.wrap(YOSEWZT_fake_script)()
  241. local function FUWSF_fake_script() -- ScrollingFrame.LocalScript
  242.     local script = Instance.new('LocalScript', ScrollingFrame)
  243.  
  244.     local game = game
  245.    
  246.     local x = script.Parent.x
  247.     local scroll = script.Parent
  248.     local frameReturned = script.Parent.Parent.Parent.rat
  249.     local main = scroll.Parent.Parent.Frame
  250.    
  251.    
  252.     local frame = frameReturned.Parent.changeinvokedawg
  253.    
  254.     local toSumbitTextBox = frame.ScrollingFrame.TextBox
  255.    
  256.     local changevaluebutton = main.changevalue
  257.    
  258.    
  259.     changevaluebutton.MouseButton1Click:Connect(function()
  260.         main.Visible = false
  261.         frame.Visible = true
  262.     end)
  263.    
  264.     local text = script.Parent.Parent.TextLabel
  265.    
  266.     local RESULT = frameReturned.ScrollingFrame.TextBox
  267.    
  268.     local Object = Instance.new("ObjectValue")
  269.     Object.Name = "RemoteFunction Selected"
  270.     Object.Parent = scroll
  271.    
  272.     local Sumbit = scroll.Parent.SUMBIT
  273.     local seevalue = scroll.Parent.SEEVALUE
  274.    
  275.     local function EXIT()
  276.         main.Visible = false
  277.         frameReturned.Visible = true
  278.     end
  279.    
  280.     seevalue.MouseButton1Click:Connect(EXIT)
  281.    
  282.     local offset = 15
  283.    
  284.     local function Clear()
  285.         for i,v in pairs(scroll:GetChildren()) do
  286.             if v~= script and v~= x then
  287.                 v:Destroy()
  288.                 offset = 15
  289.             end
  290.         end
  291.     end
  292.    
  293.     local function Sum()
  294.         if hookmetamethod then
  295.             local namecall;
  296.            
  297.             namecall = hookmetamethod(game,"__namecall", function(Self,...)
  298.                local method = getnamecallmethod()
  299.                local obj = Object.Value
  300.                local exec = toSumbitTextBox
  301.                
  302.                if method == "InvokeServer" and Self == obj and exec ~= nil and exec.Text ~= "" then
  303.                   return loadstring(exec.Text)
  304.                end
  305.                
  306.                return namecall(Self,...)
  307.             end)
  308.         else
  309.             warn("bro u dont have hookmetamethod function give up.")
  310.         end
  311.     end
  312.    
  313.     Sumbit.MouseButton1Click:Connect(function()
  314.         Sum()
  315.     end)
  316.    
  317.     local function Get()
  318.     for i,v in pairs(game:GetDescendants()) do
  319.         if v:IsA("RemoteFunction") then
  320.             local Function = x:Clone()
  321.             Function.Name = tostring(v)
  322.             Function.Text = tostring(v)
  323.             Function.Parent = scroll   
  324.             Function.Position = UDim2.new(0,0,0,offset)
  325.            
  326.             -- FUNCTION
  327.            
  328.             Function.MouseButton1Click:Connect(function()
  329.                 Object.Value = v
  330.                 local value = Object.Value
  331.                 text.Text = "Selected RemoteFunction : " .. tostring(value)    
  332.                 print("game."..value:GetFullName())
  333.                 --end)
  334.                
  335.                 --Function.MouseButton1Click:Connect(function()
  336.                     local value = Object.Value
  337.                     if value and value ~= nil then
  338.                         local result = value:InvokeServer()
  339.                         print(result)
  340.                        
  341.                         local DEBUG_TEST = tostring(value)
  342.                        
  343.                    
  344.    
  345.                         if type(result) == 'table' then
  346.                             local final = "local args = {\n"
  347.    
  348.                             for i, v in next, result do
  349.                                
  350.                                 if type(v) == "table" then
  351.                                     for ii, tab in ipairs(v) do
  352.                                         final = final .. "       [" .. tostring(ii) .. "] = " .. tostring(tab) .. ",\n"
  353.                                     end
  354.                                 else
  355.                                     final = final .. "    [" .. tostring(i) .. "] = " .. tostring(v) .. ",\n"
  356.                                 end
  357.                             end
  358.    
  359.                             final = final .. "}\n" .. "game." .. value:GetFullName() ..":InvokeServer(args)"
  360.                             RESULT.Text = final  
  361.                         else
  362.                             RESULT.Text = tostring(result)
  363.                         end
  364.                     end
  365.                 end)
  366.            
  367.             offset = offset + 15
  368.         end
  369.         end
  370.     end
  371.    
  372.     game.DescendantAdded:Connect(function(d)
  373.         if d:IsA("RemoteFunction") then
  374.             Clear()
  375.             Get()
  376.         end
  377.     end)
  378.    
  379.     Get()
  380. end
  381. coroutine.wrap(FUWSF_fake_script)()
  382. local function YOAZLEY_fake_script() -- TextLabel.LocalScript
  383.     local script = Instance.new('LocalScript', TextLabel)
  384.  
  385.     local UserInputService = game:GetService("UserInputService")
  386.    
  387.     local gui = script.Parent
  388.    
  389.     local dragging
  390.     local dragInput
  391.     local dragStart
  392.     local startPos
  393.    
  394.     local function update(input)
  395.         local delta = input.Position - dragStart
  396.         gui.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
  397.     end
  398.    
  399.     gui.InputBegan:Connect(function(input)
  400.         if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  401.             dragging = true
  402.             dragStart = input.Position
  403.             startPos = gui.Position
  404.    
  405.             input.Changed:Connect(function()
  406.                 if input.UserInputState == Enum.UserInputState.End then
  407.                     dragging = false
  408.                 end
  409.             end)
  410.         end
  411.     end)
  412.    
  413.     gui.InputChanged:Connect(function(input)
  414.         if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
  415.             dragInput = input
  416.         end
  417.     end)
  418.    
  419.     UserInputService.InputChanged:Connect(function(input)
  420.         if input == dragInput and dragging then
  421.             update(input)
  422.         end
  423.     end)
  424. end
  425. coroutine.wrap(YOAZLEY_fake_script)()
  426. local function VHSRA_fake_script() -- rat.LocalScript
  427.     local script = Instance.new('LocalScript', rat)
  428.  
  429.     local main = script.Parent.Parent.rat.Parent.Frame
  430.    
  431.     local textbox = script.Parent.ScrollingFrame.TextBox
  432.    
  433.     textbox.PlaceholderText = "-- SCRIPT GENERATED BY " .. game.Name
  434.    
  435.     local function copy()
  436.         if setclipboard and identifyexecutor then
  437.         setclipboard(textbox.Text)
  438.         else
  439.             warn("no setclipboard function? ", print(identifyexecutor() .. "is this your executor? :sob:"))
  440.         end
  441.     end
  442.    
  443.    
  444.    
  445.     local button = script.Parent.GoBACK
  446.     local copyscript = script.Parent.CopyScript
  447.    
  448.     function EXIT()
  449.         main.Visible = true
  450.         script.Parent.Visible = false
  451.     end
  452.    
  453.    
  454.     copyscript.MouseButton1Click:Connect(copy)
  455.     button.MouseButton1Click:Connect(EXIT)
  456. end
  457. coroutine.wrap(VHSRA_fake_script)()
  458. local function THTJXRY_fake_script() -- changeinvokedawg.LocalScript
  459.     local script = Instance.new('LocalScript', changeinvokedawg)
  460.  
  461.     local frame = script.Parent
  462.    
  463.     local main = frame.Parent.Frame
  464.    
  465.     local goback = frame.back
  466.     local clear = frame.Clear
  467.     local textbox = frame.ScrollingFrame.TextBox
  468.    
  469.    
  470.     local function c()
  471.         textbox.Text = ""
  472.     end
  473.    
  474.     local function GoBACK()
  475.         frame.Visible = false
  476.         main.Visible = true
  477.     end
  478.    
  479.     goback.MouseButton1Click:Connect(GoBACK)
  480.    
  481.     clear.MouseButton1Click:Connect(c)
  482. end
  483. coroutine.wrap(THTJXRY_fake_script)()
  484.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement