DrakerMaker

Chat Logger

Sep 9th, 2019
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.18 KB | None | 0 0
  1. -- Farewell Infortality.
  2. -- Version: 2.82
  3. -- Instances:
  4. local ChatGui = Instance.new("ScreenGui")
  5. local Frame = Instance.new("Frame")
  6. local LogPanel = Instance.new("ScrollingFrame")
  7. local Close = Instance.new("TextButton")
  8. local Mini = Instance.new("TextButton")
  9. local Log = Instance.new("TextButton")
  10. local title = Instance.new("TextLabel")
  11. --Properties:
  12. ChatGui.Name = "ChatGui"
  13. ChatGui.Parent = owner.PlayerGui
  14. ChatGui.ResetOnSpawn = false
  15.  
  16. Frame.Parent = ChatGui
  17. Frame.BackgroundColor3 = Color3.new(0, 0, 0)
  18. Frame.BorderSizePixel = 0
  19. Frame.Position = UDim2.new(0.0278396439, 0, 0.565217376, 0)
  20. Frame.Size = UDim2.new(0, 392, 0, 25)
  21. Frame.Active = true
  22. a = [[
  23. script.Parent.Draggable = true
  24. ]]
  25. NLS(a,Frame)
  26. LogPanel.Name = "LogPanel"
  27. LogPanel.Parent = Frame
  28. LogPanel.BackgroundColor3 = Color3.new(0, 0, 0)
  29. LogPanel.BorderColor3 = Color3.new(0.223529, 0.223529, 0.223529)
  30. LogPanel.Position = UDim2.new(-0.000221580267, 0, 0.968695641, 0)
  31. LogPanel.Size = UDim2.new(0, 392, 0, 203)
  32. LogPanel.ScrollBarThickness = 5
  33. LogPanel.ScrollingEnabled = true
  34. LogPanel.CanvasSize=UDim2.new(2,0,100,0)
  35.  
  36. Close.Name = "Close"
  37. Close.Parent = Frame
  38. Close.BackgroundColor3 = Color3.new(1, 1, 1)
  39. Close.BackgroundTransparency = 1
  40. Close.Position = UDim2.new(0.823979557, 0, 0.0399999991, 0)
  41. Close.Size = UDim2.new(0, 69, 0, 24)
  42. Close.Font = Enum.Font.SourceSans
  43. Close.Text = "Close"
  44. Close.TextColor3 = Color3.new(1, 1, 1)
  45. Close.TextSize = 14
  46.  
  47. Mini.Name = "Mini"
  48. Mini.Parent = Frame
  49. Mini.BackgroundColor3 = Color3.new(1, 1, 1)
  50. Mini.BackgroundTransparency = 1
  51. Mini.Position = UDim2.new(0.647959173, 0, 0, 0)
  52. Mini.Size = UDim2.new(0, 69, 0, 24)
  53. Mini.Font = Enum.Font.SourceSans
  54. Mini.Text = "Minimize"
  55. Mini.TextColor3 = Color3.new(1, 1, 1)
  56. Mini.TextSize = 14
  57.  
  58. Log.Name = "Log"
  59. Log.Parent = Frame
  60. Log.BackgroundColor3 = Color3.new(1, 1, 1)
  61. Log.BackgroundTransparency = 1
  62. Log.Position = UDim2.new(0.293367326, 0, 0, 0)
  63. Log.Size = UDim2.new(0, 69, 0, 24)
  64. Log.Font = Enum.Font.SourceSans
  65. Log.Text = "Log Chat [ON]"
  66. Log.TextColor3 = Color3.new(1, 1, 1)
  67. Log.TextSize = 14
  68.  
  69. title.Name = "title"
  70. title.Parent = Frame
  71. title.BackgroundColor3 = Color3.new(1, 1, 1)
  72. title.BackgroundTransparency = 1
  73. title.Size = UDim2.new(0, 115, 0, 24)
  74. title.Font = Enum.Font.SourceSans
  75. title.Text = "Chat GUI"
  76. title.TextColor3 = Color3.new(1, 1, 1)
  77. title.TextSize = 14
  78. title.TextXAlignment = Enum.TextXAlignment.Left
  79. -- Scripts:
  80. local logging = true
  81. local minimized = false
  82. Log.MouseButton1Down:Connect(function()
  83. logging = not logging
  84. if logging then Log.Text = "Log Chat [ON]" else Log.Text = "Log Chat [OFF]" end
  85. end)
  86. Mini.MouseButton1Down:Connect(function()
  87. if minimized then
  88. LogPanel:TweenSize(UDim2.new(0, 392, 0, 203), "InOut", "Sine", 0.5, false, nil)
  89. else
  90. LogPanel:TweenSize(UDim2.new(0, 392, 0, 0), "InOut", "Sine", 0.5, false, nil)
  91. end
  92. minimized = not minimized
  93. end)
  94. Close.MouseButton1Down:Connect(function()
  95. ChatGui:Destroy()
  96. end)
  97.  
  98. local prevOutputPos = 0
  99. function output(plr, msg)
  100. if not logging then return end
  101. local colour = Color3.fromRGB(255,255,255)
  102.  
  103. if string.sub(msg, 1,1) == ":" or string.sub(msg,1,1) == ";" then colour = Color3.fromRGB(255,0,0) elseif string.sub(msg,1,2) == "/w" or string.sub(msg,1,7) == "/whisper" or string.sub(msg,1,5) == "/team" or string.sub(msg,1,2) == "/t" then colour = Color3.fromRGB(0,0,255) else colour = Color3.fromRGB(255,255,255) end
  104.  
  105. local o = Instance.new("TextLabel",LogPanel)
  106. o.Text = plr.Name .. ": " .. msg
  107. o.Size = UDim2.new(0.5,0,.006,0)
  108. o.Position = UDim2.new(0,0,.007 + prevOutputPos ,0)
  109. o.Font = Enum.Font.SourceSansSemibold
  110. o.TextColor3 = colour
  111. o.TextStrokeTransparency = 0
  112. o.BackgroundTransparency = 0
  113. o.BackgroundColor3 = Color3.new(0,0,0)
  114. o.BorderSizePixel = 0
  115. o.BorderColor3 = Color3.new(0,0,0)
  116. o.FontSize = "Size14"
  117. o.TextXAlignment = Enum.TextXAlignment.Left
  118. o.ClipsDescendants = true
  119. prevOutputPos = prevOutputPos + 0.007
  120. end
  121.  
  122. for i,v in pairs(game.Players:GetChildren()) do
  123. v.Chatted:Connect(function(msg)
  124. output(v, msg)
  125. end)
  126. end
  127.  
  128. game.Players.ChildAdded:Connect(function(plr)
  129. if plr:IsA("Player") then
  130. plr.Chatted:Connect(function(msg)
  131. output(plr, msg)
  132. end)
  133. end
  134. end)
Add Comment
Please, Sign In to add comment