-- Create ScreenGui local screenGui = Instance.new("ScreenGui") screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui") -- Create Frame local frame = Instance.new("Frame") frame.Size = UDim2.new(0, 300, 0, 400) frame.Position = UDim2.new(0.5, -150, 0.5, -200) frame.BackgroundColor3 = Color3.fromRGB(35, 35, 35) frame.BorderSizePixel = 0 frame.Visible = true frame.Parent = screenGui -- Add UIStroke to Frame local frameStroke = Instance.new("UIStroke") frameStroke.Thickness = 2 frameStroke.Color = Color3.fromRGB(255, 255, 255) frameStroke.Parent = frame -- Make Frame Draggable local dragDetector = Instance.new("UIDragDetector") dragDetector.Parent = frame -- Create Toggle Button local toggleButton = Instance.new("TextButton") toggleButton.Size = UDim2.new(0, 100, 0, 50) toggleButton.Position = UDim2.new(0, 10, 0, 10) toggleButton.BackgroundColor3 = Color3.fromRGB(50, 50, 50) toggleButton.TextColor3 = Color3.fromRGB(255, 255, 255) toggleButton.Font = Enum.Font.SourceSans toggleButton.TextSize = 18 toggleButton.Text = "Toggle GUI" toggleButton.Parent = screenGui -- Toggle GUI visibility toggleButton.MouseButton1Click:Connect(function() frame.Visible = not frame.Visible end) -- Create ScrollingFrame for ClickDetectors local scrollingFrame = Instance.new("ScrollingFrame") scrollingFrame.Size = UDim2.new(1, 0, 1, 0) scrollingFrame.CanvasSize = UDim2.new(0, 0, 0, 0) scrollingFrame.ScrollBarThickness = 10 scrollingFrame.Parent = frame -- Create UIListLayout for ClickDetectors local listLayout = Instance.new("UIListLayout") listLayout.Padding = UDim.new(0, 5) listLayout.Parent = scrollingFrame -- Function to display ClickDetectors local function displayClickDetectors() local buttonHeight = 55 local totalHeight = 0 for _, obj in pairs(workspace:GetDescendants()) do if obj:IsA("ClickDetector") then local button = Instance.new("TextButton") button.Size = UDim2.new(1, -10, 0, 50) button.Position = UDim2.new(0, 5, 0, totalHeight) button.BackgroundColor3 = Color3.fromRGB(50, 50, 50) button.TextColor3 = Color3.fromRGB(255, 255, 255) button.Font = Enum.Font.SourceSans button.TextSize = 18 button.Text = obj.Parent.Name button.Parent = scrollingFrame -- Add UIStroke to Button local buttonStroke = Instance.new("UIStroke") buttonStroke.Thickness = 1 buttonStroke.Color = Color3.fromRGB(255, 255, 255) buttonStroke.Parent = button -- Connect button click to ClickDetector activation button.MouseButton1Click:Connect(function() -- Simulate a click on the ClickDetector local player = game.Players.LocalPlayer local humanoid = player.Character and player.Character:FindFirstChildOfClass("Humanoid") if humanoid then fireclickdetector(obj, humanoid) end end) totalHeight = totalHeight + buttonHeight end end -- Update CanvasSize of ScrollingFrame scrollingFrame.CanvasSize = UDim2.new(0, 0, 0, totalHeight) end -- Call the function to display ClickDetectors displayClickDetectors()