Advertisement
Hebablazin

Chat GUI

May 30th, 2016
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.54 KB | None | 0 0
  1. script.Parent = nil
  2.  
  3. function gui(player)
  4. local tab = {}
  5. local sc = Instance.new("ScreenGui",player.PlayerGui)
  6. sc.Name = "Chat"
  7. local fr = Instance.new("Frame",sc)
  8. fr.Size = UDim2.new(0.34,0,0.25,0)
  9. fr.Position = UDim2.new(0,0,0.75,0)
  10. fr.BackgroundColor3 = Color3.new(0.13,0.13,0.13)
  11. local bu = Instance.new("TextButton",fr)
  12. bu.Size = UDim2.new(1,0,0.1,0)
  13. bu.Text = "Remove"
  14. bu.Position = UDim2.new(0,0,-0.1,0)
  15. bu.BackgroundColor3 = Color3.new(0,0,0)
  16. bu.TextColor3 = Color3.new(1,1,1)
  17. bu.MouseButton1Click:connect(function()
  18. fr.Parent:remove()
  19. end)
  20. local pos = 130
  21. for _,v in pairs(game.Players:GetChildren()) do
  22. v.Chatted:connect(function(msg)
  23. local color = Color3.new(1,1,1)
  24. local nam = Instance.new("TextLabel",fr)
  25. nam.Size = UDim2.new(1,0,0.08,0)
  26. nam.Position = UDim2.new(0,0,0,pos)
  27. nam.Text = v.Name.." :"
  28. nam.TextXAlignment = "Left"
  29. nam.TextColor3 = Color3.new(1,1,1)
  30. nam.BackgroundColor3 = Color3.new(0,0,0)
  31. table.insert(tab, nam)
  32. local stri = msg
  33. if string.sub(stri,1,7) == "script/" or string.sub(stri,1,2) == "c/" or string.sub(stri,1,3) == "do/" or string.sub(stri,1,4) == "/sc " then
  34. stri = "*This script is hidden for other people.*"
  35. color = Color3.new(0.8,0.15,0.15)
  36. elseif string.find(stri, "shit") or string.find(stri, "ass") or string.find(stri, "nerd") or string.find(stri, "crap") or string.find(stri, "gay") or string.find(stri, "bi ") or string.find(stri, "pussy") or string.find(stri, "tit") or string.find(stri, "boob") or string.find(stri, "penis") or string.find(stri, "bitch") or string.find(stri, "fuck") or string.find(stri, "vagina") or string.find(stri, "dick") or string.find(stri, "fuuu") then
  37. stri = "*Message censored due to bad language*"
  38. color = Color3.new(0.8,0.7,0)
  39. end
  40. local na = Instance.new("TextLabel",nam)
  41. na.Size = UDim2.new(1,0,1,0)
  42. na.BackgroundTransparency = 1
  43. na.Position = UDim2.new(0,90,0,0)
  44. na.Text = stri
  45. na.TextXAlignment = "Left"
  46. na.TextColor3 = color
  47. if na.Text == "Label" then
  48. na.Text = "*What did I just say?*"
  49. color = Color3.new(0.8,0.7,0)
  50. na.TextColor3 = color
  51. end
  52. for i=1, #tab do
  53. tab[i].Position = tab[i].Position + UDim2.new(0,0,0,-13)
  54. if tab[i].Position.Y.Offset <= -10 then
  55. tab[i]:remove()
  56. end
  57. end
  58. end)
  59. end
  60. end
  61.  
  62. for _,v in pairs(game.Players:GetChildren()) do
  63. gui(v)
  64. v.Changed:connect(function(prop)
  65. if prop == "Character" then
  66. gui(v)
  67. end
  68. end)
  69. end
  70.  
  71. game.Players.PlayerAdded:connect(function(pla)
  72. wait(10)
  73. gui(pla)
  74. pla.Changed:connect(function(prop)
  75. if prop == "Character" then
  76. gui(pla)
  77. end
  78. end)
  79. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement