Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Output Capture GUI Script for AWP Executor
- -- Captures all Roblox output and displays in custom GUI
- local Players = game:GetService("Players")
- local LogService = game:GetService("LogService")
- local TweenService = game:GetService("TweenService")
- local UserInputService = game:GetService("UserInputService")
- local RunService = game:GetService("RunService")
- local Player = Players.LocalPlayer
- local PlayerGui = Player:WaitForChild("PlayerGui")
- -- Object Hierarchy:
- -- PlayerGui
- -- └── OutputCaptureGUI
- -- └── MainFrame
- -- ├── TopBar
- -- │ ├── Title
- -- │ ├── MinimizeButton
- -- │ └── CloseButton
- -- ├── OutputFrame
- -- │ ├── ScrollingFrame
- -- │ │ └── OutputList (UIListLayout)
- -- │ └── ScrollBar
- -- └── ControlsFrame
- -- ├── ClearButton
- -- ├── FilterFrame
- -- │ ├── InfoToggle
- -- │ ├── WarningToggle
- -- │ └── ErrorToggle
- -- └── ResizeHandle
- -- Main GUI Creation
- local OutputCaptureGUI = Instance.new("ScreenGui")
- OutputCaptureGUI.Name = "OutputCaptureGUI"
- OutputCaptureGUI.ResetOnSpawn = false
- OutputCaptureGUI.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- OutputCaptureGUI.Parent = PlayerGui
- -- Main Frame
- local MainFrame = Instance.new("Frame")
- MainFrame.Name = "MainFrame"
- MainFrame.Size = UDim2.new(0, 600, 0, 400)
- MainFrame.Position = UDim2.new(0.5, -300, 0.5, -200)
- MainFrame.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
- MainFrame.BorderSizePixel = 0
- MainFrame.Active = true
- MainFrame.Draggable = true
- MainFrame.Parent = OutputCaptureGUI
- -- Corner rounding
- local MainCorner = Instance.new("UICorner")
- MainCorner.CornerRadius = UDim.new(0, 8)
- MainCorner.Parent = MainFrame
- -- Top Bar
- local TopBar = Instance.new("Frame")
- TopBar.Name = "TopBar"
- TopBar.Size = UDim2.new(1, 0, 0, 30)
- TopBar.Position = UDim2.new(0, 0, 0, 0)
- TopBar.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
- TopBar.BorderSizePixel = 0
- TopBar.Parent = MainFrame
- local TopBarCorner = Instance.new("UICorner")
- TopBarCorner.CornerRadius = UDim.new(0, 8)
- TopBarCorner.Parent = TopBar
- -- Title
- local Title = Instance.new("TextLabel")
- Title.Name = "Title"
- Title.Size = UDim2.new(1, -60, 1, 0)
- Title.Position = UDim2.new(0, 10, 0, 0)
- Title.BackgroundTransparency = 1
- Title.Text = "Roblox Output Capture"
- Title.TextColor3 = Color3.fromRGB(255, 255, 255)
- Title.TextSize = 14
- Title.TextXAlignment = Enum.TextXAlignment.Left
- Title.Font = Enum.Font.SourceSansBold
- Title.Parent = TopBar
- -- Minimize Button
- local MinimizeButton = Instance.new("TextButton")
- MinimizeButton.Name = "MinimizeButton"
- MinimizeButton.Size = UDim2.new(0, 25, 0, 25)
- MinimizeButton.Position = UDim2.new(1, -55, 0, 2.5)
- MinimizeButton.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
- MinimizeButton.BorderSizePixel = 0
- MinimizeButton.Text = "-"
- MinimizeButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- MinimizeButton.TextSize = 16
- MinimizeButton.Font = Enum.Font.SourceSansBold
- MinimizeButton.Parent = TopBar
- local MinimizeCorner = Instance.new("UICorner")
- MinimizeCorner.CornerRadius = UDim.new(0, 4)
- MinimizeCorner.Parent = MinimizeButton
- -- Close Button
- local CloseButton = Instance.new("TextButton")
- CloseButton.Name = "CloseButton"
- CloseButton.Size = UDim2.new(0, 25, 0, 25)
- CloseButton.Position = UDim2.new(1, -27, 0, 2.5)
- CloseButton.BackgroundColor3 = Color3.fromRGB(220, 53, 69)
- CloseButton.BorderSizePixel = 0
- CloseButton.Text = "×"
- CloseButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- CloseButton.TextSize = 16
- CloseButton.Font = Enum.Font.SourceSansBold
- CloseButton.Parent = TopBar
- local CloseCorner = Instance.new("UICorner")
- CloseCorner.CornerRadius = UDim.new(0, 4)
- CloseCorner.Parent = CloseButton
- -- Output Frame
- local OutputFrame = Instance.new("Frame")
- OutputFrame.Name = "OutputFrame"
- OutputFrame.Size = UDim2.new(1, -20, 1, -80)
- OutputFrame.Position = UDim2.new(0, 10, 0, 35)
- OutputFrame.BackgroundColor3 = Color3.fromRGB(15, 15, 15)
- OutputFrame.BorderSizePixel = 0
- OutputFrame.Parent = MainFrame
- local OutputCorner = Instance.new("UICorner")
- OutputCorner.CornerRadius = UDim.new(0, 6)
- OutputCorner.Parent = OutputFrame
- -- Scrolling Frame
- local ScrollingFrame = Instance.new("ScrollingFrame")
- ScrollingFrame.Name = "ScrollingFrame"
- ScrollingFrame.Size = UDim2.new(1, -10, 1, -10)
- ScrollingFrame.Position = UDim2.new(0, 5, 0, 5)
- ScrollingFrame.BackgroundTransparency = 1
- ScrollingFrame.BorderSizePixel = 0
- ScrollingFrame.ScrollBarThickness = 8
- ScrollingFrame.ScrollBarImageColor3 = Color3.fromRGB(100, 100, 100)
- ScrollingFrame.CanvasSize = UDim2.new(0, 0, 0, 0)
- ScrollingFrame.Parent = OutputFrame
- -- Output List Layout
- local OutputList = Instance.new("UIListLayout")
- OutputList.Name = "OutputList"
- OutputList.SortOrder = Enum.SortOrder.LayoutOrder
- OutputList.Padding = UDim.new(0, 2)
- OutputList.Parent = ScrollingFrame
- -- Controls Frame
- local ControlsFrame = Instance.new("Frame")
- ControlsFrame.Name = "ControlsFrame"
- ControlsFrame.Size = UDim2.new(1, -20, 0, 35)
- ControlsFrame.Position = UDim2.new(0, 10, 1, -40)
- ControlsFrame.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
- ControlsFrame.BorderSizePixel = 0
- ControlsFrame.Parent = MainFrame
- local ControlsCorner = Instance.new("UICorner")
- ControlsCorner.CornerRadius = UDim.new(0, 6)
- ControlsCorner.Parent = ControlsFrame
- -- Clear Button
- local ClearButton = Instance.new("TextButton")
- ClearButton.Name = "ClearButton"
- ClearButton.Size = UDim2.new(0, 60, 0, 25)
- ClearButton.Position = UDim2.new(0, 10, 0, 5)
- ClearButton.BackgroundColor3 = Color3.fromRGB(220, 53, 69)
- ClearButton.BorderSizePixel = 0
- ClearButton.Text = "Clear"
- ClearButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- ClearButton.TextSize = 12
- ClearButton.Font = Enum.Font.SourceSans
- ClearButton.Parent = ControlsFrame
- local ClearCorner = Instance.new("UICorner")
- ClearCorner.CornerRadius = UDim.new(0, 4)
- ClearCorner.Parent = ClearButton
- -- Filter toggles
- local filterButtons = {}
- local filters = {
- {name = "Info", color = Color3.fromRGB(70, 130, 180), enabled = true},
- {name = "Warning", color = Color3.fromRGB(255, 193, 7), enabled = true},
- {name = "Error", color = Color3.fromRGB(220, 53, 69), enabled = true}
- }
- for i, filter in ipairs(filters) do
- local button = Instance.new("TextButton")
- button.Name = filter.name .. "Toggle"
- button.Size = UDim2.new(0, 60, 0, 25)
- button.Position = UDim2.new(0, 80 + (i-1)*70, 0, 5)
- button.BackgroundColor3 = filter.enabled and filter.color or Color3.fromRGB(60, 60, 60)
- button.BorderSizePixel = 0
- button.Text = filter.name
- button.TextColor3 = Color3.fromRGB(255, 255, 255)
- button.TextSize = 11
- button.Font = Enum.Font.SourceSans
- button.Parent = ControlsFrame
- local buttonCorner = Instance.new("UICorner")
- buttonCorner.CornerRadius = UDim.new(0, 4)
- buttonCorner.Parent = button
- filterButtons[filter.name:lower()] = {button = button, enabled = filter.enabled, color = filter.color}
- end
- -- Variables for output management
- local outputMessages = {}
- local messageCount = 0
- local isMinimized = false
- local maxMessages = 1000 -- Memory optimization
- -- Message type colors
- local messageColors = {
- [Enum.MessageType.MessageOutput] = Color3.fromRGB(255, 255, 255),
- [Enum.MessageType.MessageInfo] = Color3.fromRGB(70, 130, 180),
- [Enum.MessageType.MessageWarning] = Color3.fromRGB(255, 193, 7),
- [Enum.MessageType.MessageError] = Color3.fromRGB(220, 53, 69)
- }
- -- Message type names
- local messageTypeNames = {
- [Enum.MessageType.MessageOutput] = "output",
- [Enum.MessageType.MessageInfo] = "info",
- [Enum.MessageType.MessageWarning] = "warning",
- [Enum.MessageType.MessageError] = "error"
- }
- -- Function to create message entry
- local function createMessageEntry(message, messageType, timestamp)
- local messageFrame = Instance.new("Frame")
- messageFrame.Name = "MessageEntry"
- messageFrame.Size = UDim2.new(1, -10, 0, 0)
- messageFrame.BackgroundTransparency = 1
- messageFrame.BorderSizePixel = 0
- messageFrame.LayoutOrder = messageCount
- local messageLabel = Instance.new("TextLabel")
- messageLabel.Name = "MessageLabel"
- messageLabel.Size = UDim2.new(1, 0, 1, 0)
- messageLabel.BackgroundTransparency = 1
- messageLabel.Text = string.format("[%s] %s", timestamp, message)
- messageLabel.TextColor3 = messageColors[messageType] or Color3.fromRGB(255, 255, 255)
- messageLabel.TextSize = 12
- messageLabel.Font = Enum.Font.SourceSans
- messageLabel.TextXAlignment = Enum.TextXAlignment.Left
- messageLabel.TextYAlignment = Enum.TextYAlignment.Top
- messageLabel.TextWrapped = true
- messageLabel.RichText = true
- messageLabel.Parent = messageFrame
- -- Calculate text height
- local textSize = game:GetService("TextService"):GetTextSize(
- messageLabel.Text,
- messageLabel.TextSize,
- messageLabel.Font,
- Vector2.new(ScrollingFrame.AbsoluteSize.X - 20, math.huge)
- )
- messageFrame.Size = UDim2.new(1, -10, 0, math.max(textSize.Y + 4, 16))
- -- Store message type for filtering
- messageFrame:SetAttribute("MessageType", messageTypeNames[messageType] or "output")
- return messageFrame
- end
- -- Function to add message to GUI
- local function addMessage(message, messageType, timestamp)
- local messageEntry = createMessageEntry(message, messageType, timestamp)
- messageEntry.Parent = ScrollingFrame
- messageCount = messageCount + 1
- outputMessages[messageCount] = {frame = messageEntry, type = messageTypeNames[messageType] or "output"}
- -- Memory management - remove old messages
- if messageCount > maxMessages then
- local oldMessage = outputMessages[messageCount - maxMessages]
- if oldMessage and oldMessage.frame then
- oldMessage.frame:Destroy()
- end
- outputMessages[messageCount - maxMessages] = nil
- end
- -- Update canvas size
- RunService.Heartbeat:Wait()
- ScrollingFrame.CanvasSize = UDim2.new(0, 0, 0, OutputList.AbsoluteContentSize.Y + 10)
- -- Auto-scroll to bottom
- ScrollingFrame.CanvasPosition = Vector2.new(0, ScrollingFrame.CanvasSize.Y.Offset)
- end
- -- Function to filter messages
- local function filterMessages()
- for _, messageData in pairs(outputMessages) do
- if messageData.frame and messageData.frame.Parent then
- local messageType = messageData.type
- local filterData = filterButtons[messageType]
- if filterData then
- messageData.frame.Visible = filterData.enabled
- else
- messageData.frame.Visible = filterButtons.info.enabled -- Default to info filter
- end
- end
- end
- -- Update canvas size after filtering
- RunService.Heartbeat:Wait()
- ScrollingFrame.CanvasSize = UDim2.new(0, 0, 0, OutputList.AbsoluteContentSize.Y + 10)
- end
- -- Function to clear all messages
- local function clearMessages()
- for _, messageData in pairs(outputMessages) do
- if messageData.frame then
- messageData.frame:Destroy()
- end
- end
- outputMessages = {}
- messageCount = 0
- ScrollingFrame.CanvasSize = UDim2.new(0, 0, 0, 0)
- end
- -- Function to toggle minimize
- local function toggleMinimize()
- isMinimized = not isMinimized
- local targetSize = isMinimized and UDim2.new(0, 600, 0, 30) or UDim2.new(0, 600, 0, 400)
- local targetPos = isMinimized and UDim2.new(0.5, -300, 0, 10) or UDim2.new(0.5, -300, 0.5, -200)
- local tween = TweenService:Create(MainFrame, TweenInfo.new(0.3, Enum.EasingStyle.Quart), {
- Size = targetSize,
- Position = targetPos
- })
- tween:Play()
- OutputFrame.Visible = not isMinimized
- ControlsFrame.Visible = not isMinimized
- MinimizeButton.Text = isMinimized and "+" or "-"
- end
- -- Event connections
- ClearButton.MouseButton1Click:Connect(clearMessages)
- MinimizeButton.MouseButton1Click:Connect(toggleMinimize)
- CloseButton.MouseButton1Click:Connect(function()
- OutputCaptureGUI:Destroy()
- end)
- -- Filter button connections
- for filterName, filterData in pairs(filterButtons) do
- filterData.button.MouseButton1Click:Connect(function()
- filterData.enabled = not filterData.enabled
- filterData.button.BackgroundColor3 = filterData.enabled and filterData.color or Color3.fromRGB(60, 60, 60)
- filterMessages()
- end)
- end
- -- LogService connection for capturing output
- local logConnection = LogService.MessageOut:Connect(function(message, messageType)
- local timestamp = os.date("%H:%M:%S")
- addMessage(message, messageType, timestamp)
- end)
- -- Cleanup on GUI destruction
- OutputCaptureGUI.AncestryChanged:Connect(function()
- if not OutputCaptureGUI.Parent then
- if logConnection then
- logConnection:Disconnect()
- end
- end
- end)
- -- Initial message
- addMessage("Output Capture GUI initialized successfully!", Enum.MessageType.MessageInfo, os.date("%H:%M:%S"))
- print("Output Capture GUI loaded! Use the interface to monitor all Roblox output.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement