Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- _G.KeyBind = Enum.KeyCode.K; --default: K
- _G.Scaled = false; --default: false
- local awrite = true
- local a, b = pcall(function()
- if writefile then
- awrite = false
- end
- end)
- if awrite == false then
- local ChatLogs = Instance.new("ScreenGui")
- local Back = Instance.new("Frame")
- local TopBar = Instance.new("Frame")
- local TitleTxt = Instance.new("TextLabel")
- local TextLabel = Instance.new("TextLabel")
- local TextLabel_2 = Instance.new("TextLabel")
- local ChatLogs_2 = Instance.new("ScrollingFrame")
- local ExampleChatThing = Instance.new("Frame")
- local Namee = Instance.new("TextLabel")
- local ChatMsg = Instance.new("TextLabel")
- local UIListLayout = Instance.new("UIListLayout")
- local plrs = game:GetService("Players")
- local uis = game:GetService("UserInputService")
- local function ranString()
- local chars = {
- "a",
- "A",
- "b",
- "B",
- "c",
- "C",
- "d",
- "D",
- "e",
- "E",
- "f",
- "F",
- "g",
- "G",
- "h",
- "H",
- "i",
- "I",
- "j",
- "J",
- "k",
- "K",
- "l",
- "L",
- "m",
- "M",
- "n",
- "N",
- "o",
- "O",
- "p",
- "P",
- "q",
- "Q",
- "r",
- "R",
- "s",
- "S",
- "t",
- "T",
- "u",
- "U",
- "v",
- "V",
- "w",
- "W",
- "x",
- "X",
- "y",
- "Y",
- "z",
- "Z",
- "1",
- "2",
- "3",
- "4",
- "5",
- "6",
- "7",
- "8",
- "9",
- "0"
- }
- local str = ""
- for i = 1, 10 do
- local num = math.random(1, #chars)
- local ch = chars[num]
- str = str..ch
- end
- return str;
- end
- ChatLogs.Name = ranString()
- ChatLogs.Parent = game:GetService("CoreGui")
- ChatLogs.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- Back.Name = "Back"
- Back.Parent = ChatLogs
- Back.BackgroundColor3 = Color3.new(1, 1, 1)
- Back.BorderSizePixel = 0
- Back.Position = UDim2.new(0.695, 0, 0.738, 0)
- Back.Size = UDim2.new(0.3, 0, 0.25, 0)
- Back.Active = true
- Back.Draggable = true
- TopBar.Name = "TopBar"
- TopBar.Parent = Back
- TopBar.BackgroundColor3 = Color3.new(1, 1, 1)
- TopBar.BackgroundTransparency = 0.75
- TopBar.Size = UDim2.new(1, 0, 0.100000001, 0)
- TitleTxt.Name = "TitleTxt"
- TitleTxt.Parent = TopBar
- TitleTxt.BackgroundColor3 = Color3.new(1, 1, 1)
- TitleTxt.BackgroundTransparency = 1
- TitleTxt.Position = UDim2.new(0.0199999996, 0, 0, 0)
- TitleTxt.Size = UDim2.new(0.699999988, 0, 0.899999976, 0)
- TitleTxt.Font = Enum.Font.SourceSansBold
- TitleTxt.Text = "CHAT LOGGER"
- TitleTxt.TextColor3 = Color3.new(0, 0, 0)
- TitleTxt.TextScaled = true
- TitleTxt.TextSize = 14
- TitleTxt.TextWrapped = true
- TitleTxt.TextXAlignment = Enum.TextXAlignment.Left
- ChatLogs_2.Name = "ChatLogs"
- ChatLogs_2.Parent = Back
- ChatLogs_2.BackgroundColor3 = Color3.new(1, 1, 1)
- ChatLogs_2.BackgroundTransparency = 1
- ChatLogs_2.BorderSizePixel = 0
- ChatLogs_2.Position = UDim2.new(0, 0, 0.100000001, 0)
- ChatLogs_2.Size = UDim2.new(1, 0, 0.9, 0)
- ChatLogs_2.CanvasSize = UDim2.new(0, 0, 300, 0)
- ChatLogs_2.ScrollBarImageColor3 = Color3.new(0, 0, 0)
- ChatLogs_2.ScrollBarThickness = 8
- ExampleChatThing.Name = "ExampleChatThing"
- ExampleChatThing.Parent = ChatLogs_2
- ExampleChatThing.BackgroundColor3 = Color3.new(1, 1, 1)
- ExampleChatThing.BackgroundTransparency = 1
- ExampleChatThing.Size = UDim2.new(0.98, 0, 0, 25)
- ExampleChatThing.Visible = false
- Namee.Name = "Namee"
- Namee.Parent = ExampleChatThing
- Namee.BackgroundColor3 = Color3.new(1, 1, 1)
- Namee.BackgroundTransparency = 1
- Namee.Position = UDim2.new(0.01, 0, 0, 0)
- Namee.Size = UDim2.new(0.23, 0, 0.75, 0)
- Namee.Font = Enum.Font.SourceSans
- Namee.Text = "[player]:"
- Namee.TextColor3 = Color3.new(0, 0, 0)
- Namee.TextScaled = false
- Namee.TextSize = 14
- Namee.TextWrapped = true
- Namee.TextXAlignment = Enum.TextXAlignment.Left
- ChatMsg.Name = "ChatMsg"
- ChatMsg.Parent = ExampleChatThing
- ChatMsg.BackgroundColor3 = Color3.new(1, 1, 1)
- ChatMsg.BackgroundTransparency = 1
- ChatMsg.Position = UDim2.new(0.25, 0, 0, 0)
- ChatMsg.Size = UDim2.new(0.75, 0, 1.14, 0)
- ChatMsg.Font = Enum.Font.SourceSans
- ChatMsg.Text = "message"
- ChatMsg.TextColor3 = Color3.new(0, 0, 0)
- ChatMsg.TextSize = 14
- ChatMsg.TextWrapped = true
- ChatMsg.TextXAlignment = Enum.TextXAlignment.Left
- ChatMsg.TextYAlignment = Enum.TextYAlignment.Top
- if getrenv()._G.Scaled then
- if getrenv()._G.Scaled == true then
- ChatMsg.TextScaled = true
- else
- ChatMsg.TextScaled = false
- end
- end
- UIListLayout.Parent = ChatLogs_2
- UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
- UIListLayout.Padding = UDim.new(0, 1)
- if _G.KeyBind then
- uis.InputBegan:Connect(function(input, pro)
- if input.UserInputType == Enum.UserInputType.Keyboard then
- if not pro and input.KeyCode == _G.KeyBind then
- Back.Visible = not Back.Visible
- end
- end
- end)
- end
- local logString;
- local nString = ""
- local function logMsg(plr, message)
- local datat = os.date("*t", os.time())
- nString = nString.."["..datat["hour"]..":"..datat["min"]..":"..datat["sec"].."] ["..plr.Name.."]: "..message.."\n"
- logString = nString
- local msgUi = ExampleChatThing:Clone()
- msgUi.ChatMsg.Text = message
- msgUi.Namee.Text = "["..plr.Name.."]:"
- msgUi.Parent = ChatLogs_2
- msgUi.Name = "message"
- msgUi.Visible = true
- end
- for i, v in pairs(plrs:GetPlayers()) do
- v.Chatted:Connect(function(message)
- logMsg(v, message)
- end)
- end
- plrs.PlayerAdded:Connect(function(plr)
- plr.Chatted:Connect(function(message)
- logMsg(plr, message)
- end)
- end)
- else
- warn("...")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement