Advertisement
overgrinds

Shows Gui

Nov 11th, 2024 (edited)
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.28 KB | None | 0 0
  1. -- Script 1: Duplicating and modifying Trial GUI
  2.  
  3. local Players = game:GetService("Players")
  4. local LocalPlayer = Players.LocalPlayer
  5. local PlayerGui = LocalPlayer:WaitForChild("PlayerGui")
  6. local UI = PlayerGui:WaitForChild("UI")
  7. local HUD = UI:WaitForChild("HUD")
  8. local LobbyTimer = Game.Workspace.Server:WaitForChild("Trial"):WaitForChild("Lobby"):WaitForChild("Easy_Screen"):WaitForChild("Frame"):WaitForChild("Value")
  9.  
  10. -- 1. Find the original Trial GUI
  11. local Trial = HUD:WaitForChild("Trial")
  12.  
  13. -- 2. Duplicate the Trial GUI and rename it to InfoContainer
  14. if HUD:FindFirstChild("InfoContainer") then
  15. HUD:FindFirstChild("InfoContainer"):Destroy()
  16. end
  17.  
  18. if HUD:FindFirstChild("Gacha"):FindFirstChild("Left"):FindFirstChild("HideStarsContainer") then
  19. HUD:FindFirstChild("Gacha"):FindFirstChild("Left"):FindFirstChild("HideStarsContainer"):Destroy()
  20. end
  21. local InfoContainer = Trial:Clone()
  22. InfoContainer.Name = "InfoContainer"
  23. InfoContainer.Parent = HUD -- Parent it under the same container
  24. InfoContainer.Visible = not Trial.Visible
  25.  
  26. -- 3. Make InfoContainer visible only if the original Trial GUI is not visible
  27.  
  28.  
  29. -- 4. Rename Trial.Frame.Timer to Trial Countdown
  30. local Timer = InfoContainer:WaitForChild("Frame"):WaitForChild("Timer")
  31. local Mobs = InfoContainer:WaitForChild("Frame"):WaitForChild("Mobs")
  32. local Room = InfoContainer:WaitForChild("Frame"):WaitForChild("Room")
  33. local InfoFrame = InfoContainer:WaitForChild("Frame")
  34.  
  35. -- 5. Change Timer.Title text to "Trial Countdown"
  36. local TimerTitle = Timer:FindFirstChild("Title")
  37. if TimerTitle then
  38. TimerTitle:Destroy()
  39. end
  40.  
  41. local TimerValue = Timer.Value
  42. TimerValue:FindFirstChild("UID"):Destroy()
  43.  
  44. -- Script 2: Duplicating and modifying AutoSell button in Gacha HUD
  45.  
  46. local GachaHUD = PlayerGui:WaitForChild("UI"):WaitForChild("HUD"):WaitForChild("Gacha")
  47. local AutoSell = GachaHUD:WaitForChild("Left"):WaitForChild("AutoSell")
  48.  
  49. -- Duplicate AutoSell and rename it
  50. local HideStarsContainer = AutoSell:Clone()
  51. HideStarsContainer.Name = "HideStarsContainer"
  52. HideStarsContainer.Parent = GachaHUD.Left -- Parent it under the same container
  53.  
  54. -- Modify the child Frame
  55. local Frame = HideStarsContainer:FindFirstChild("Frame") -- Correctly searching for "Frame"
  56. if Frame then
  57. -- Destroy existing Icon (with capital I)
  58. local Icon = Frame:FindFirstChild("Icon") -- Searching for "Icon" with a capital I
  59. if Icon then
  60. Icon:Destroy() -- Remove the original icon
  61. end
  62.  
  63. -- Create a new TextLabel
  64. local TextLabel = Instance.new("TextLabel")
  65. TextLabel.Name = "CloseButton"
  66. TextLabel.Text = "X" -- Display "X" as the close symbol
  67. TextLabel.TextColor3 = Color3.fromRGB(170, 0, 0) -- Set the text color
  68. TextLabel.Font = Enum.Font.SourceSansBold -- Use a bold font
  69. TextLabel.TextSize = 70 -- Adjust the size of the text
  70. TextLabel.BackgroundTransparency = 1 -- Make the background transparent
  71. TextLabel.Size = UDim2.new(1, 0, 1, 0) -- Match the Frame size
  72. TextLabel.Parent = Frame -- Parent it to the Frame
  73.  
  74. -- Add click functionality
  75. Frame.InputBegan:Connect(function(input)
  76. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  77. GachaHUD.Visible = false -- Hide the Gacha HUD
  78. end
  79. end)
  80. end
  81.  
  82. local PetLevel = game:GetService("Players").LocalPlayer.PlayerGui.UI.HUD.InfoContainer.Frame.Mobs.Value
  83. local PetName = game:GetService("Players").LocalPlayer.PlayerGui.UI.HUD.InfoContainer.Frame.Mobs.Title
  84. local LevelBox = game:GetService("Players").LocalPlayer.PlayerGui.Box.Pet.Frame.Utils.Level
  85. local ExpBox = game:GetService("Players").LocalPlayer.PlayerGui.Box.Pet.Frame.Utils.Exp
  86. local PetNameBox = game:GetService("Players").LocalPlayer.PlayerGui.Box.Pet.Frame.Title
  87. local PetExp = game:GetService("Players").LocalPlayer.PlayerGui.UI.HUD.InfoContainer.Frame.Room.Value
  88.  
  89. if PetLevel:FindFirstChild("UID") then
  90. PetLevel:FindFirstChild("UID"):Destroy()
  91. PetLevel.Position = UDim2.new(0.5, 0, 0.5, 0)
  92. end
  93. if PetExp:FindFirstChild("UID") then
  94. PetExp:FindFirstChild("UID"):Destroy()
  95. PetExp.Position = UDim2.new(0.5, 0, 0.5, 0)
  96. end
  97. if Mobs:FindFirstChild("Icon") then
  98. Mobs:FindFirstChild("Icon"):Destroy()
  99. end
  100. if Mobs:FindFirstChild("Title") then
  101. Mobs:FindFirstChild("Title"):Destroy()
  102. end
  103. if Room:FindFirstChild("Icon") then
  104. Room:FindFirstChild("Icon"):Destroy()
  105. end
  106. if Room:FindFirstChild("Title") then
  107. Room:FindFirstChild("Title"):Destroy()
  108. end
  109. Room.Size = UDim2.new(1,0,1,0)
  110. Mobs.Size = UDim2.new(1,0,1,0)
  111. Timer.Size = UDim2.new(1,0,1,0)
  112. InfoFrame.Size = UDim2.new(1,0,0.15,0)
  113.  
  114.  
  115. -- Function to update both text labels when the target texts change
  116. local function updateText()
  117. TimerValue.Text = LobbyTimer.Text
  118. PetLevel.Text = PetNameBox.Text.. " " ..LevelBox.Text
  119. PetExp.Text = ExpBox.Text
  120. end
  121.  
  122. -- Connect the Changed event to update the text labels whenever the target texts change
  123. local connection1 = LobbyTimer:GetPropertyChangedSignal("Text"):Connect(updateText)
  124. local connection2 = ExpBox:GetPropertyChangedSignal("Text"):Connect(updateText)
  125. local connection3 = PetNameBox:GetPropertyChangedSignal("Text"):Connect(updateText)
  126. local connection4 = LevelBox:GetPropertyChangedSignal("Text"):Connect(updateText)
  127.  
  128. -- Initial call to set the text when the script runs
  129. updateText()
  130.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement