Advertisement
SQUIDMAN740

Chat Spy

Mar 27th, 2019
494
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.67 KB | None | 0 0
  1. --[[
  2.  
  3. Made by daniel#0003
  4.  
  5. Logs all whsipers and hidden chats with a UI
  6.  
  7. Usage:
  8.  
  9. /e clear - clears the text in the gui because im lazy to make it auto scroll
  10.  
  11. --]]
  12.  
  13. for i,v in pairs(game.Players.LocalPlayer.PlayerGui:GetChildren()) do
  14. if v.Name == "WhisperSpy" then
  15. v:Destroy()
  16. else
  17.  
  18. end
  19. end
  20.  
  21. local ScreenGui = Instance.new("ScreenGui")
  22. local Scroll = Instance.new("ScrollingFrame")
  23. ScreenGui.Name = "WhisperSpy"
  24. ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  25. ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  26. Scroll.Name = "Scroll"
  27. Scroll.Parent = ScreenGui
  28. Scroll.BackgroundColor3 = Color3.new(0.337255, 0.337255, 0.337255)
  29. Scroll.BackgroundTransparency = 0.89999997615814
  30. Scroll.Position = UDim2.new(0.0159817338, 0, 0.631728053, 0)
  31. Scroll.Size = UDim2.new(0, 405, 0, 222)
  32. Scroll.CanvasPosition = Vector2.new(0, 484)
  33. Scroll.CanvasSize = UDim2.new(0, 0, 1, 0)
  34. Scroll.ScrollBarThickness = 10
  35. function SCRIPT_KTFX73_FAKESCRIPT()
  36. local script = Instance.new('LocalScript')
  37. script.Parent = ScreenGui
  38.  
  39. local plr = game.Players.LocalPlayer
  40. local Scroll = script.Parent.Scroll
  41.  
  42. local textnumber = 1
  43. local prevOutputPos = 0
  44.  
  45. function output(plr, msg)
  46. local colour = Color3.fromRGB(255,255,255)
  47. local labels = Scroll:GetChildren()
  48.  
  49. if string.sub(msg, 1,2) == "/e" or string.sub(msg,1,2) == "/w" or string.sub(msg,1,2) == "/t" or string.sub(msg,1,8) == "/console" or string.sub(msg,1,5) == "/team" or string.sub(msg,1,8) == "/whisper" then colour = Color3.fromRGB(255, 255, 0) else colour = Color3.fromRGB(255,255,255) end
  50. local o = Instance.new("TextLabel",Scroll)
  51. o.Name = textnumber
  52. textnumber = textnumber + 1
  53. o.Text = plr.Name .. ": " .. msg
  54. o.Size = UDim2.new(0.95,0,.02,0)
  55. o.Position = UDim2.new(0,0,.02 + prevOutputPos ,0)
  56. o.Font = Enum.Font.SourceSansBold
  57. o.TextColor3 = colour
  58. o.TextStrokeTransparency = 0
  59. o.BackgroundTransparency = 1
  60. o.BackgroundColor3 = Color3.new(0,0,0)
  61. o.BorderSizePixel = 0
  62. o.BorderColor3 = Color3.new(0,0,0)
  63. o.FontSize = "Size14"
  64. o.TextXAlignment = Enum.TextXAlignment.Left
  65. o.ClipsDescendants = true
  66. prevOutputPos = prevOutputPos + 0.025
  67. end
  68.  
  69. for i,v in pairs(game.Players:GetChildren()) do
  70. v.Chatted:Connect(function(msg)
  71. output(v, msg)
  72. end)
  73. end
  74.  
  75. game.Players.ChildAdded:Connect(function(plr)
  76. if plr:IsA("Player") then
  77. plr.Chatted:Connect(function(msg)
  78. output(plr, msg)
  79. end)
  80. end
  81. end)
  82.  
  83. plr.Chatted:Connect(function(msg)
  84. if msg == "/e clear" then
  85. for i,v in pairs(Scroll:GetChildren()) do
  86. if v:IsA("TextLabel") then
  87. prevOutputPos = 0
  88. v:Destroy()
  89. textnumber = 1
  90. end
  91. end
  92. end
  93. end)
  94.  
  95.  
  96. end
  97. coroutine.resume(coroutine.create(SCRIPT_KTFX73_FAKESCRIPT))
  98.  
  99. [Image: ZOmYvt.png]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement