1zxyuuki

Chat

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