Advertisement
ExecutorForALLdomain

Dex Function

Jul 5th, 2024 (edited)
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.26 KB | None | 0 0
  1. -- Gui to Lua
  2. -- Version: 3.2
  3.  
  4. -- Instances:
  5.  
  6. local DEX = Instance.new("ScreenGui")
  7. local ScrollingFrame = Instance.new("ScrollingFrame")
  8. local FunctionViewer = Instance.new("Frame")
  9. local Copy = Instance.new("TextButton")
  10. local CopyPath = Instance.new("TextButton")
  11. local TextButton = Instance.new("TextButton")
  12. local TextLabel = Instance.new("TextLabel")
  13. local Frame = Instance.new("Frame")
  14. local Exit = Instance.new("TextButton")
  15. local ScrollingFrame2 = Instance.new("ScrollingFrame")
  16. local TextBox = Instance.new("TextBox")
  17. local Tab = Instance.new("Frame")
  18. local Close = Instance.new("TextButton")
  19. local Open = Instance.new("TextButton")
  20.  
  21. --Properties:
  22.  
  23. DEX.Name = "DEX"
  24. DEX.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  25. DEX.DisplayOrder = 999999999
  26. DEX.ResetOnSpawn = false
  27.  
  28. ScrollingFrame.Parent = DEX
  29. ScrollingFrame.Active = true
  30. ScrollingFrame.BackgroundColor3 = Color3.fromRGB(54, 54, 54)
  31. ScrollingFrame.BorderColor3 = Color3.fromRGB(0, 0, 0)
  32. ScrollingFrame.BorderSizePixel = 0
  33. ScrollingFrame.Position = UDim2.new(0.858112037, 0, -0.00125185167, 0)
  34. ScrollingFrame.Size = UDim2.new(0, 256, 0, 920)
  35. ScrollingFrame.SizeConstraint = Enum.SizeConstraint.RelativeXX
  36. ScrollingFrame.CanvasSize = UDim2.new(0, 0, 2, 6000)
  37. ScrollingFrame.VerticalScrollBarPosition = Enum.VerticalScrollBarPosition.Left
  38.  
  39. FunctionViewer.Name = "FunctionViewer"
  40. FunctionViewer.Parent = DEX
  41. FunctionViewer.BackgroundColor3 = Color3.fromRGB(66, 66, 66)
  42. FunctionViewer.BorderColor3 = Color3.fromRGB(0, 0, 0)
  43. FunctionViewer.BorderSizePixel = 0
  44. FunctionViewer.Position = UDim2.new(0.350400984, 0, 0.221864954, 0)
  45. FunctionViewer.Size = UDim2.new(0, 498, 0, 18)
  46.  
  47. Copy.Name = "Copy"
  48. Copy.Parent = FunctionViewer
  49. Copy.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
  50. Copy.BorderColor3 = Color3.fromRGB(0, 0, 0)
  51. Copy.BorderSizePixel = 0
  52. Copy.Position = UDim2.new(0, 0, 1, 0)
  53. Copy.Size = UDim2.new(0, 180, 0, 17)
  54. Copy.Font = Enum.Font.SourceSans
  55. Copy.Text = "Copy to Clipboard"
  56. Copy.TextColor3 = Color3.fromRGB(255, 255, 255)
  57. Copy.TextSize = 14.000
  58.  
  59. CopyPath.Name = "CopyPath"
  60. CopyPath.Parent = FunctionViewer
  61. CopyPath.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
  62. CopyPath.BorderColor3 = Color3.fromRGB(0, 0, 0)
  63. CopyPath.BorderSizePixel = 0
  64. CopyPath.Position = UDim2.new(0.361445785, 0, 1, 0)
  65. CopyPath.Size = UDim2.new(0, 180, 0, 17)
  66. CopyPath.Font = Enum.Font.SourceSans
  67. CopyPath.Text = "LocalScript Path (broken)"
  68. CopyPath.TextColor3 = Color3.fromRGB(255, 255, 255)
  69. CopyPath.TextSize = 14.000
  70.  
  71. TextButton.Parent = FunctionViewer
  72. TextButton.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
  73. TextButton.BorderColor3 = Color3.fromRGB(0, 0, 0)
  74. TextButton.BorderSizePixel = 0
  75. TextButton.Position = UDim2.new(0.722891569, 0, 1, 0)
  76. TextButton.Size = UDim2.new(0, 138, 0, 17)
  77. TextButton.Font = Enum.Font.SourceSans
  78. TextButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  79. TextButton.TextSize = 14.000
  80.  
  81. TextLabel.Parent = FunctionViewer
  82. TextLabel.BackgroundColor3 = Color3.fromRGB(66, 66, 66)
  83. TextLabel.BorderColor3 = Color3.fromRGB(0, 0, 0)
  84. TextLabel.BorderSizePixel = 0
  85. TextLabel.Size = UDim2.new(0, 102, 0, 18)
  86. TextLabel.Font = Enum.Font.SourceSans
  87. TextLabel.Text = "Function Viewer"
  88. TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  89. TextLabel.TextSize = 14.000
  90.  
  91. Frame.Parent = FunctionViewer
  92. Frame.BackgroundColor3 = Color3.fromRGB(36, 36, 36)
  93. Frame.BorderColor3 = Color3.fromRGB(0, 0, 0)
  94. Frame.BorderSizePixel = 0
  95. Frame.Position = UDim2.new(0, 0, 1.94444442, 0)
  96. Frame.Size = UDim2.new(0, 18, 0, 321)
  97.  
  98. Exit.Name = "Exit"
  99. Exit.Parent = FunctionViewer
  100. Exit.BackgroundColor3 = Color3.fromRGB(66, 66, 66)
  101. Exit.BorderColor3 = Color3.fromRGB(0, 0, 0)
  102. Exit.BorderSizePixel = 0
  103. Exit.Position = UDim2.new(0.939759016, 0, 0, 0)
  104. Exit.Size = UDim2.new(0, 30, 0, 18)
  105. Exit.Font = Enum.Font.SourceSans
  106. Exit.Text = "X"
  107. Exit.TextColor3 = Color3.fromRGB(255, 255, 255)
  108. Exit.TextSize = 14.000
  109.  
  110. ScrollingFrame2.Name = "ScrollingFrame2"
  111. ScrollingFrame2.Parent = FunctionViewer
  112. ScrollingFrame2.Active = true
  113. ScrollingFrame2.BackgroundColor3 = Color3.fromRGB(36, 36, 36)
  114. ScrollingFrame2.BorderColor3 = Color3.fromRGB(0, 0, 0)
  115. ScrollingFrame2.BorderSizePixel = 0
  116. ScrollingFrame2.Position = UDim2.new(0.0361446999, 0, 1.94444609, 0)
  117. ScrollingFrame2.Size = UDim2.new(0, 480, 0, 321)
  118. ScrollingFrame2.CanvasSize = UDim2.new(0, 0, 2, 2000)
  119.  
  120. TextBox.Parent = ScrollingFrame2
  121. TextBox.BackgroundColor3 = Color3.fromRGB(36, 36, 36)
  122. TextBox.BorderColor3 = Color3.fromRGB(0, 0, 0)
  123. TextBox.BorderSizePixel = 0
  124. TextBox.Position = UDim2.new(-0.00135536189, 0, -1.90140668e-07, 0)
  125. TextBox.Size = UDim2.new(0, 480, 0, 2294)
  126. TextBox.ClearTextOnFocus = false
  127. TextBox.Font = Enum.Font.SourceSans
  128. TextBox.MultiLine = true
  129. TextBox.Text = ""
  130. TextBox.TextColor3 = Color3.fromRGB(120, 120, 120)
  131. TextBox.TextSize = 15.000
  132. TextBox.TextXAlignment = Enum.TextXAlignment.Left
  133. TextBox.TextYAlignment = Enum.TextYAlignment.Top
  134.  
  135. Tab.Name = "Tab"
  136. Tab.Parent = DEX
  137. Tab.BackgroundColor3 = Color3.fromRGB(44, 44, 44)
  138. Tab.BorderColor3 = Color3.fromRGB(0, 0, 0)
  139. Tab.BorderSizePixel = 0
  140. Tab.Position = UDim2.new(0.837754488, 0, -0.00173611485, 0)
  141. Tab.Size = UDim2.new(0, 36, 0, 234)
  142.  
  143. Close.Name = "Close"
  144. Close.Parent = Tab
  145. Close.BackgroundColor3 = Color3.fromRGB(44, 44, 44)
  146. Close.BorderColor3 = Color3.fromRGB(0, 0, 0)
  147. Close.BorderSizePixel = 0
  148. Close.Position = UDim2.new(0, 0, 1, 0)
  149. Close.Size = UDim2.new(0, 36, 0, 31)
  150. Close.Font = Enum.Font.SourceSans
  151. Close.Text = ">"
  152. Close.TextColor3 = Color3.fromRGB(255, 255, 255)
  153. Close.TextSize = 32.000
  154.  
  155. Open.Name = "Open"
  156. Open.Parent = DEX
  157. Open.BackgroundColor3 = Color3.fromRGB(44, 44, 44)
  158. Open.BorderColor3 = Color3.fromRGB(0, 0, 0)
  159. Open.BorderSizePixel = 0
  160. Open.Position = UDim2.new(0.985194325, 0, 0, 0)
  161. Open.Size = UDim2.new(0, 23, 0, 56)
  162. Open.Visible = false
  163. Open.Font = Enum.Font.SourceSans
  164. Open.Text = "<"
  165. Open.TextColor3 = Color3.fromRGB(255, 255, 255)
  166. Open.TextSize = 33.000
  167. Open.TextWrapped = true
  168.  
  169. -- Scripts:
  170.  
  171. local function EZBXHVB_fake_script() -- ScrollingFrame.LocalScript2
  172. local script = Instance.new('LocalScript', ScrollingFrame)
  173.  
  174. local UserInputService = game:GetService("UserInputService")
  175. local Viewer = script.Parent.Parent:WaitForChild("FunctionViewer")
  176. local Box = Viewer:WaitForChild("ScrollingFrame2"):WaitForChild("TextBox")
  177.  
  178. -- Positioning variables
  179. local yOffset = 0
  180. local buttonHeight = 30
  181. local padding = 5
  182.  
  183. -- Keep track of the currently selected button
  184. local selectedButton = nil
  185.  
  186. -- Function to convert tables to a readable string format
  187. local function tableToString(tbl, indent, seen)
  188. indent = indent or 0
  189. seen = seen or {}
  190. local toReturn = ""
  191. local prefix = string.rep(" ", indent)
  192.  
  193. seen[tbl] = true
  194.  
  195. for k, v in pairs(tbl) do
  196. if type(v) == "table" then
  197. if seen[v] then
  198. toReturn = toReturn .. prefix .. tostring(k) .. " = *circular reference*\n"
  199. else
  200. toReturn = toReturn .. prefix .. tostring(k) .. " = {\n" .. tableToString(v, indent + 2, seen) .. prefix .. "}\n"
  201. end
  202. else
  203. toReturn = toReturn .. prefix .. tostring(k) .. " = " .. tostring(v) .. "\n"
  204. end
  205. end
  206.  
  207. seen[tbl] = nil
  208. return toReturn
  209. end
  210.  
  211. for _, v in pairs(game:GetDescendants()) do
  212. if v:IsA("LocalScript") or v:IsA("Script") or v:IsA("ModuleScript") then
  213. local TextButton = Instance.new("TextButton")
  214.  
  215. TextButton.Name = v.Name
  216. TextButton.Text = v.Name
  217. TextButton.Parent = script.Parent -- Assuming this script is a child of the ScrollingFrame
  218.  
  219. -- Customize the appearance of the TextButton
  220. TextButton.BackgroundColor3 = Color3.fromRGB(54, 54, 54)
  221. TextButton.Size = UDim2.new(1, 0, 0, buttonHeight) -- Full width, fixed height
  222. TextButton.Position = UDim2.new(0, 0, 0, yOffset)
  223. TextButton.Font = Enum.Font.SourceSans
  224. TextButton.TextSize = 18
  225. TextButton.TextColor3 = Color3.fromRGB(240, 240, 240)
  226. TextButton.TextWrapped = true
  227.  
  228. -- Update yOffset for the next button
  229. yOffset = yOffset + buttonHeight + padding
  230.  
  231. -- Function to handle the button click
  232. local function Click()
  233. -- Revert the color of the previously selected button
  234. if selectedButton then
  235. selectedButton.BackgroundColor3 = Color3.fromRGB(54, 54, 54)
  236. end
  237.  
  238. -- Set the new selected button and change its color
  239. selectedButton = TextButton
  240. TextButton.BackgroundColor3 = Color3.fromRGB(67, 87, 141) -- Light blue color
  241.  
  242. -- Show and update the TextBox with environment variables of the script
  243. Viewer.Visible = true
  244.  
  245. Box.Text = ""
  246.  
  247. if v:IsA("ModuleScript") then
  248. -- If it's a ModuleScript, require the module and display its contents
  249. local success, result = pcall(require, v)
  250. if success and type(result) == "table" then
  251. for i, val in next, result do
  252. if type(val) == "table" then
  253. Box.Text = Box.Text .. tostring(i) .. " = {\n" .. tableToString(val, 2) .. "}\n"
  254. else
  255. Box.Text = Box.Text .. tostring(i) .. " = " .. tostring(val) .. "\n"
  256. end
  257. end
  258. else
  259. Box.Text = "Error: Could not require the module or invalid module content."
  260. end
  261. else
  262. -- If it's a LocalScript or Script, use getsenv
  263. local senv = getsenv(v)
  264. if type(senv) == "table" then
  265. -- Iterate over the environment variables and print them to the TextBox
  266. for k, val in pairs(senv) do
  267. if type(val) == "table" then
  268. Box.Text = Box.Text .. tostring(k) .. " = {\n" .. tableToString(val, 2) .. "}\n"
  269. else
  270. Box.Text = Box.Text .. tostring(k) .. " = " .. tostring(val) .. "\n"
  271. end
  272. end
  273. else
  274. Box.Text = "Error: Could not retrieve environment variables."
  275. end
  276. end
  277.  
  278. -- Set the full name of the script to the clipboard
  279. setclipboard("game." .. v:GetFullName())
  280. end
  281.  
  282. -- Connect the button click to the Click function
  283. TextButton.MouseButton1Click:Connect(Click)
  284. end
  285. end
  286.  
  287. end
  288. coroutine.wrap(EZBXHVB_fake_script)()
  289. local function FTQRV_fake_script() -- Copy.LocalScript
  290. local script = Instance.new('LocalScript', Copy)
  291.  
  292. local TextBox = game.Players.LocalPlayer.PlayerGui.DEX.FunctionViewer.ScrollingFrame2.TextBox
  293.  
  294. local function Click()
  295. setclipboard(TextBox.Text)
  296. end
  297. b = script.Parent
  298. b.MouseButton1Click:Connect(Click)
  299. end
  300. coroutine.wrap(FTQRV_fake_script)()
  301. local function PPUT_fake_script() -- CopyPath.LocalScript
  302. local script = Instance.new('LocalScript', CopyPath)
  303.  
  304. local BOX = game.Players.LocalPlayer.PlayerGui.DEX.FunctionViewer.ScrollingFrame2.TextBox
  305. local function OnClick()
  306. setclipboard("game."..BOX:GetFullName())
  307. end
  308. b = script.Parent
  309. b.MouseButton1Click:Connect(OnClick)
  310. end
  311. coroutine.wrap(PPUT_fake_script)()
  312. local function NTGIVRQ_fake_script() -- TextButton.LocalScript
  313. local script = Instance.new('LocalScript', TextButton)
  314.  
  315. local function Click()
  316. print("Test")
  317. end
  318. end
  319. coroutine.wrap(NTGIVRQ_fake_script)()
  320. local function WNPZ_fake_script() -- FunctionViewer.LocalScript
  321. local script = Instance.new('LocalScript', FunctionViewer)
  322.  
  323. local UserInputService = game:GetService("UserInputService")
  324.  
  325. local gui = script.Parent
  326.  
  327. local dragging
  328. local dragInput
  329. local dragStart
  330. local startPos
  331.  
  332. local function update(input)
  333. local delta = input.Position - dragStart
  334. gui.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
  335. end
  336.  
  337. gui.InputBegan:Connect(function(input)
  338. if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  339. dragging = true
  340. dragStart = input.Position
  341. startPos = gui.Position
  342.  
  343. input.Changed:Connect(function()
  344. if input.UserInputState == Enum.UserInputState.End then
  345. dragging = false
  346. end
  347. end)
  348. end
  349. end)
  350.  
  351. gui.InputChanged:Connect(function(input)
  352. if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
  353. dragInput = input
  354. end
  355. end)
  356.  
  357. UserInputService.InputChanged:Connect(function(input)
  358. if input == dragInput and dragging then
  359. update(input)
  360. end
  361. end)
  362. end
  363. coroutine.wrap(WNPZ_fake_script)()
  364. local function KJBRH_fake_script() -- Exit.LocalScript
  365. local script = Instance.new('LocalScript', Exit)
  366.  
  367. local function Click()
  368. local Viewer = game.Players.LocalPlayer.PlayerGui.DEX.FunctionViewer
  369. Viewer.Visible = false
  370. end
  371. b = script.Parent
  372. b.MouseButton1Click:Connect(Click)
  373. end
  374. coroutine.wrap(KJBRH_fake_script)()
  375. local function VVVPDC_fake_script() -- TextBox.LocalScript
  376. local script = Instance.new('LocalScript', TextBox)
  377.  
  378. local textbox = script.Parent
  379. textbox.Changed:Connect(function()
  380. textbox.Text = textbox.Text:sub(1,21474836)
  381. end)
  382. end
  383. coroutine.wrap(VVVPDC_fake_script)()
  384. local function RBQUX_fake_script() -- Close.LocalScript
  385. local script = Instance.new('LocalScript', Close)
  386.  
  387. local TweenService = game:GetService("TweenService")
  388. local Players = game:GetService("Players")
  389.  
  390. local PlayerGui = Players.LocalPlayer:WaitForChild("PlayerGui")
  391. local ScreenGui = PlayerGui:WaitForChild("DEX")
  392. local Frame = ScreenGui:WaitForChild("Tab")
  393. local Frame2 = ScreenGui:WaitForChild("ScrollingFrame")
  394.  
  395. -- Définir l'AnchorPoint
  396. Frame.AnchorPoint = Vector2.new(0, 0.5)
  397. -- Enregistrer les positions initiales
  398. local initialPosition = Frame.Position
  399. local initialPosition2 = Frame2.Position
  400.  
  401. -- Définir les positions cibles
  402. local targetPosition = UDim2.new(1, 0, 0, 0)
  403. local targetPosition2 = UDim2.new(1, 0, 0, 0)
  404.  
  405. local tweenInfo = TweenInfo.new(2)
  406. local tweenInfo2 = TweenInfo.new(2)
  407.  
  408. local isAtTarget = true
  409.  
  410. local function E()
  411. local tween, tween2
  412.  
  413. if isAtTarget then
  414. tween = TweenService:Create(Frame2, tweenInfo2, {Position = initialPosition2})
  415. tween2 = TweenService:Create(Frame, tweenInfo, {Position = initialPosition})
  416. Frame.Close.Text = ">"
  417. else
  418. tween = TweenService:Create(Frame2, tweenInfo2, {Position = targetPosition2})
  419. tween2 = TweenService:Create(Frame, tweenInfo, {Position = targetPosition})
  420. Frame.Close.Text = "<"
  421. end
  422.  
  423. tween:Play()
  424. tween2:Play()
  425. ScreenGui.Open.Visible = true
  426. isAtTarget = not isAtTarget
  427. end
  428.  
  429. local b = script.Parent
  430. b.MouseButton1Click:Connect(E)
  431.  
  432. end
  433. coroutine.wrap(RBQUX_fake_script)()
  434. local function YYMHQF_fake_script() -- Open.LocalScript
  435. local script = Instance.new('LocalScript', Open)
  436.  
  437. local function E()
  438. local TweenService = game:GetService("TweenService")
  439. local Players = game:GetService("Players")
  440.  
  441. local PlayerGui = Players.LocalPlayer:WaitForChild("PlayerGui")
  442. local ScreenGui = PlayerGui:WaitForChild("DEX")
  443. local Frame = ScreenGui:WaitForChild("Tab")
  444. local Frame2 = game.Players.LocalPlayer.PlayerGui.DEX.ScrollingFrame
  445.  
  446. Frame.AnchorPoint = Vector2.new(0, 0)
  447.  
  448. local targetPosition = UDim2.new(0.838, 0,-0.002, 0)
  449. local targetPosition2 = UDim2.new(0.858, 0,-0.001, 0)
  450.  
  451. local tweenInfo = TweenInfo.new(2)
  452. local tweenInfo2 = TweenInfo.new(2)
  453. local tween = TweenService:Create(Frame2, tweenInfo2, {Position = targetPosition2})
  454. local tween2 = TweenService:Create(Frame, tweenInfo, {Position = targetPosition})
  455.  
  456. tween:Play()
  457. tween2:Play()
  458. wait(1)
  459. Frame.Close.Text = ">"
  460. end
  461. b = script.Parent
  462. b.Visible = false
  463. b.MouseButton1Click:Connect(E)
  464. end
  465. coroutine.wrap(YYMHQF_fake_script)()
  466.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement