-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.lua
More file actions
163 lines (132 loc) · 4.16 KB
/
main.lua
File metadata and controls
163 lines (132 loc) · 4.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
local isMinimized = false
function CreateGui(parental)
local ScrnGui = Instance.new("ScreenGui",parental)
ScrnGui.Name = "OutputWindowABC"
ScrnGui.ResetOnSpawn = false
local Main = Instance.new("Frame",ScrnGui)
Main.Name = "Main"
Main.BorderSizePixel = 0
Main.BackgroundColor3 = Color3.new(15/255,15/255,15/255)
Main.Size = UDim2.new(0,500,0,300)
Main.Position = UDim2.new(0.5,-250,0.5,-150)
Main.Draggable = true
Main.Active = true
local Inside = Instance.new("Frame",Main)
Inside.Name = "Inside"
Inside.BorderSizePixel = 0
Inside.BackgroundColor3 = Color3.new(25/255,25/255,25/255)
Inside.Size = UDim2.new(0,500,0,270)
Inside.Position = UDim2.new(0,0,0,30)
Inside.Active = true
local Minimize = Instance.new("TextButton",Main)
Minimize.Name = "Minimize"
Minimize.BorderSizePixel = 0
Minimize.BackgroundColor3 = Color3.new(15/255,15/255,15/255)
Minimize.Size = UDim2.new(0,30,0,30)
Minimize.Position = UDim2.new(0,470,0,0)
Minimize.Text = "-"
Minimize.TextSize = 16
Minimize.TextColor3 = Color3.new(1,1,1)
Minimize.Active = true
local Title = Instance.new("TextLabel",Main)
Title.Name = "Title"
Title.BorderSizePixel = 0
Title.Size = UDim2.new(0,0,0,0)
Title.Position = UDim2.new(0,5,0,15)
Title.Text = "Output (Loading)"
Title.TextColor3 = Color3.new(1,1,1)
Title.Font = Enum.Font.BuilderSansExtraBold
Title.TextSize = 16
Title.TextXAlignment = Enum.TextXAlignment.Left
Title.Active = true
local Output = Instance.new("TextBox",Inside)
Output.Name = "Output"
Output.Text = "[LOADING]"
Output.Position = UDim2.new(0,5,0,5)
Output.Size = UDim2.new(0,490,0,230)
Output.BackgroundColor3 = Color3.new(15/255,15/255,15/255)
Output.BorderSizePixel = 0
Output.TextWrapped = false
Output.TextColor3 = Color3.new(1,1,1)
Output.ClearTextOnFocus = false
Output.Font = Enum.Font.Code
Output.TextSize = 16
Output.TextXAlignment = Enum.TextXAlignment.Left
Output.TextYAlignment = Enum.TextYAlignment.Top
Output.MultiLine = true
Output.Active = true
return {ScrnGui, Main, Inside, Minimize, Title, Output}
end
local FullTable = nil
if game:GetService("RunService"):IsClient() then
FullTable = CreateGui(game:GetService("Players").LocalPlayer:FindFirstChildWhichIsA("PlayerGui"))
else
FullTable = CreateGui(script["Parent"]["Parent"])
end
local ScrnGui = FullTable[1]
local Main = FullTable[2]
local Inside = FullTable[3]
local Minimize = FullTable[4]
local Title = FullTable[5]
local Output = FullTable[6]
pcall(function()spawn(function()
while wait() do
local OutputLogs = game:GetService("LogService"):GetLogHistory()
local ResultOutput = ""
if #OutputLogs < 15 then
for i,v in pairs(OutputLogs) do
local MessageType = ""
if v["messageType"] == Enum.MessageType.MessageOutput then
MessageType = "OUTPUT"
elseif v["messageType"] == Enum.MessageType.MessageWarning then
MessageType = "WARNING"
elseif v["messageType"] == Enum.MessageType.MessageError then
MessageType = "ERROR"
elseif v["messageType"] == Enum.MessageType.MessageInfo then
MessageType = "INFORMATION"
else
MessageType = "UNKNOWN"
end
ResultOutput = ResultOutput.."["..MessageType.."] "..v["message"].."\n"
end
else
for v=(#OutputLogs-14),#OutputLogs do
local MessageType = ""
if OutputLogs[v]["messageType"] == Enum.MessageType.MessageOutput then
MessageType = "OUTPUT"
elseif OutputLogs[v]["messageType"] == Enum.MessageType.MessageWarning then
MessageType = "WARNING"
elseif OutputLogs[v]["messageType"] == Enum.MessageType.MessageError then
MessageType = "ERROR"
elseif OutputLogs[v]["messageType"] == Enum.MessageType.MessageInfo then
MessageType = "INFORMATION"
else
MessageType = "UNKNOWN"
end
ResultOutput = ResultOutput.."["..MessageType.."] "..OutputLogs[v]["message"].."\n"
end
end
Output.Text = ResultOutput
end
end)end)
if game:GetService("RunService"):IsServer() then
Title.Text = "Output (Server)"
elseif game:GetService("RunService"):IsClient() then
Title.Text = "Output (Client)"
else
Title.Text = "Output (Unknown)"
end
Minimize.MouseButton1Click:Connect(function()
if isMinimized then
Main.Size = UDim2.new(0,500,0,300)
Inside.Visible = true
Minimize.Text = "-"
isMinimized = false
else
Main.Size = UDim2.new(0,500,0,30)
Inside.Visible = false
Minimize.Text = "+"
isMinimized = true
end
end)
game:GetService("TestService"):Message("Output Window started up.")