local LogService = game:GetService("LogService")
local UserInputService = game:GetService("UserInputService")
local StarterGui = game:GetService("StarterGui")
local Players = game:GetService("Players")
local Player = Players.LocalPlayer
local PlayerGui = Player:WaitForChild("PlayerGui")
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, false)
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, true)
local Filters = {
Output = true,
Warning = true,
Error = true,
Remote = true
}
local ScreenGui = Instance.new("ScreenGui")
ScreenGui.Name = "MnaX_Console"
ScreenGui.ResetOnSpawn = false
ScreenGui.Parent = PlayerGui
local Main = Instance.new("Frame")
Main.Name = "Main"
Main.Size = UDim2.new(0, 700, 0, 520)
Main.Position = UDim2.new(0.5, -350, 0.5, -260)
Main.BackgroundColor3 = Color3.fromRGB(15, 15, 17)
Main.BorderSizePixel = 0
Main.Visible = false
Main.Active = true
Main.Parent = ScreenGui
Instance.new("UICorner", Main).CornerRadius = UDim.new(0, 12)
local MainStroke = Instance.new("UIStroke", Main)
MainStroke.Thickness = 3
MainStroke.Color = Color3.fromRGB(40, 40, 45)
local Header = Instance.new("Frame")
Header.Size = UDim2.new(1, 0, 0, 50)
Header.BackgroundTransparency = 1
Header.Parent = Main
local Title = Instance.new("TextLabel")
Title.Size = UDim2.new(0, 200, 1, 0)
Title.Position = UDim2.new(0, 15, 0, 0)
Title.BackgroundTransparency = 1
Title.Text = "MnaX Console"
Title.TextColor3 = Color3.new(1, 1, 1)
Title.TextSize = 22
Title.Font = Enum.Font.Code
Title.TextXAlignment = Enum.TextXAlignment.Left
Title.Parent = Header
local CloseBtn = Instance.new("TextButton")
CloseBtn.Size = UDim2.new(0, 40, 0, 30)
CloseBtn.Position = UDim2.new(1, -50, 0, 10)
CloseBtn.BackgroundColor3 = Color3.fromRGB(200, 0, 0)
CloseBtn.Text = "X"
CloseBtn.TextSize = 20
CloseBtn.TextColor3 = Color3.new(1, 1, 1)
CloseBtn.Font = Enum.Font.SourceSansBold
CloseBtn.Parent = Header
Instance.new("UICorner", CloseBtn)
local ToggleBar = Instance.new("Frame")
ToggleBar.Size = UDim2.new(1, -20, 0, 30)
ToggleBar.Position = UDim2.new(0, 10, 0, 50)
ToggleBar.BackgroundTransparency = 1
ToggleBar.Parent = Main
local function createToggle(name, color, x)
local btn = Instance.new("TextButton")
btn.Size = UDim2.new(0, 80, 1, 0)
btn.Position = UDim2.new(0, x, 0, 0)
btn.BackgroundColor3 = color
btn.Text = name
btn.Font = Enum.Font.Code
btn.TextSize = 12
btn.TextColor3 = Color3.new(1, 1, 1)
btn.Parent = ToggleBar
Instance.new("UICorner", btn).CornerRadius = UDim.new(0, 4)
btn.MouseButton1Click:Connect(function()
Filters[name] = not Filters[name]
btn.BackgroundTransparency = Filters[name] and 0 or 0.6
for _, log in pairs(Main.LogContainer.Scroll:GetChildren()) do
if log:IsA("TextLabel") and log:GetAttribute("MsgType") == name then
log.Visible = Filters[name]
end
end
end)
end
createToggle("Output", Color3.fromRGB(60, 60, 65), 0)
createToggle("Warning", Color3.fromRGB(180, 140, 0), 90)
createToggle("Error", Color3.fromRGB(150, 40, 40), 180)
createToggle("Remote", Color3.fromRGB(100, 50, 150), 270)
local SearchBar = Instance.new("TextBox")
SearchBar.Size = UDim2.new(1, -20, 0, 35)
SearchBar.Position = UDim2.new(0, 10, 0, 90)
SearchBar.BackgroundColor3 = Color3.fromRGB(25, 25, 30)
SearchBar.TextColor3 = Color3.new(1, 1, 1)
SearchBar.PlaceholderText = "Search logs..."
SearchBar.Text = ""
SearchBar.Font = Enum.Font.Code
SearchBar.TextSize = 14
SearchBar.TextXAlignment = Enum.TextXAlignment.Left
SearchBar.Parent = Main
Instance.new("UICorner", SearchBar)
Instance.new("UIPadding", SearchBar).PaddingLeft = UDim.new(0, 10)
local LogContainer = Instance.new("Frame")
LogContainer.Name = "LogContainer"
LogContainer.Size = UDim2.new(1, -20, 1, -145)
LogContainer.Position = UDim2.new(0, 10, 0, 135)
LogContainer.BackgroundColor3 = Color3.fromRGB(20, 20, 22)
LogContainer.Parent = Main
Instance.new("UICorner", LogContainer)
local Scroll = Instance.new("ScrollingFrame")
Scroll.Name = "Scroll"
Scroll.Size = UDim2.new(1, -10, 1, -10)
Scroll.Position = UDim2.new(0, 5, 0, 5)
Scroll.BackgroundTransparency = 1
Scroll.AutomaticCanvasSize = Enum.AutomaticSize.Y
Scroll.ScrollBarThickness = 4
Scroll.Parent = LogContainer
Instance.new("UIListLayout", Scroll).Padding = UDim.new(0, 2)
local function addLog(msg, msgType, isRemote)
local typeName = "Output"
local color = Color3.new(1, 1, 1)
if isRemote then
typeName = "Remote"
color = Color3.fromRGB(180, 120, 255)
elseif msgType == Enum.MessageType.MessageWarning then
typeName = "Warning"
color = Color3.fromRGB(255, 200, 0)
elseif msgType == Enum.MessageType.MessageError then
typeName = "Error"
color = Color3.fromRGB(255, 80, 80)
end
local label = Instance.new("TextLabel")
label.Size = UDim2.new(1, 0, 0, 25)
label.BackgroundTransparency = 1
label.TextColor3 = color
label.Text = string.format("[%s] %s", os.date("%X"), msg)
label.TextSize = 16
label.Font = Enum.Font.Code
label.TextXAlignment = Enum.TextXAlignment.Left
label.Visible = Filters[typeName]
label:SetAttribute("MsgType", typeName)
label:SetAttribute("SearchText", label.Text:lower())
label.Parent = Scroll
end
for _, h in pairs(LogService:GetLogHistory()) do addLog(h.message, h.messageType) end
LogService.MessageOut:Connect(addLog)
task.spawn(function()
for _, obj in pairs(game:GetDescendants()) do
if obj:IsA("RemoteEvent") then
obj.OnClientEvent:Connect(function()
addLog("Remote Fired: " .. obj.Name, nil, true)
end)
end
end
end)
SearchBar:GetPropertyChangedSignal("Text"):Connect(function()
local q = SearchBar.Text:lower()
for _, l in pairs(Scroll:GetChildren()) do
if l:IsA("TextLabel") then
local matchesSearch = l:GetAttribute("SearchText"):find(q) ~= nil
local matchesFilter = Filters[l:GetAttribute("MsgType")]
l.Visible = matchesSearch and matchesFilter
end
end
end)
local dragging, dragStart, startPos
Header.InputBegan:Connect(function(i)
if i.UserInputType == Enum.UserInputType.MouseButton1 then
dragging = true dragStart = i.Position startPos = Main.Position
end
end)
UserInputService.InputChanged:Connect(function(i)
if dragging and i.UserInputType == Enum.UserInputType.MouseMovement then
local delta = i.Position - dragStart
Main.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
end
end)
UserInputService.InputEnded:Connect(function(i)
if i.UserInputType == Enum.UserInputType.MouseButton1 then dragging = false end
end)
local function toggle() Main.Visible = not Main.Visible end
UserInputService.InputBegan:Connect(function(i, g) if i.KeyCode == Enum.KeyCode.F10 then toggle() end end)
Player.Chatted:Connect(function(m) if m:lower() == "/mconsole" then toggle() end end)
CloseBtn.MouseButton1Click:Connect(toggle)
Comments
No comments yet
Be the first to share your thoughts!