Advertisement
DopeShotx

Reveal Private Chat Roblox Script

Dec 25th, 2022
1,233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.97 KB | Gaming | 0 0
  1. reveal private chatting
  2. --This script reveals ALL hidden messages in the default chat
  3.  
  4. --chat "/spy" to toggle!
  5.  
  6. enabled = true
  7.  
  8. --if true will check your messages too
  9.  
  10. spyOnMyself = true
  11.  
  12. --if true will chat the logs publicly (fun, risky)
  13.  
  14. public = false
  15.  
  16. --if true will use /me to stand out
  17.  
  18. publicItalics = true
  19.  
  20. --customize private logs
  21.  
  22. privateProperties = {
  23.  
  24. Color = Color3.fromRGB(0,255,255);
  25.  
  26. Font = Enum.Font.SourceSansBold;
  27.  
  28. TextSize = 18;
  29.  
  30. }
  31.  
  32. --////////////////////////////////////////////////////////////////
  33.  
  34. local StarterGui = game:GetService("StarterGui")
  35.  
  36. local Players = game:GetService("Players")
  37.  
  38. local player = Players.LocalPlayer
  39.  
  40. local saymsg = game:GetService("ReplicatedStorage"):WaitForChild("DefaultChatSystemChatEvents"):WaitForChild("SayMessageRequest")
  41.  
  42. local getmsg = game:GetService("ReplicatedStorage"):WaitForChild("DefaultChatSystemChatEvents"):WaitForChild("OnMessageDoneFiltering")
  43.  
  44. local instance = (_G.chatSpyInstance or 0) + 1
  45.  
  46. _G.chatSpyInstance = instance
  47.  
  48.  
  49. local function onChatted(p,msg)
  50.  
  51. if _G.chatSpyInstance == instance then
  52.  
  53. if p==player and msg:lower():sub(1,4)=="/spy" then
  54.  
  55. enabled = not enabled
  56.  
  57. wait(0.3)
  58.  
  59. privateProperties.Text = "{SPY "..(enabled and "EN" or "DIS").."ABLED}"
  60.  
  61. StarterGui:SetCore("ChatMakeSystemMessage",privateProperties)
  62.  
  63. elseif enabled and (spyOnMyself==true or p~=player) then
  64.  
  65. msg = msg:gsub("[\n\r]",''):gsub("\t",' '):gsub("[ ]+",' ')
  66.  
  67. local hidden = true
  68.  
  69. local conn = getmsg.OnClientEvent:Connect(function(packet,channel)
  70.  
  71. if packet.SpeakerUserId==p.UserId and packet.Message==msg:sub(#msg-#packet.Message+1) and (channel=="All" or (channel=="Team" and public==false and Players[packet.FromSpeaker].Team==player.Team)) then
  72.  
  73. hidden = false
  74.  
  75. end
  76.  
  77. end)
  78.  
  79. wait(1)
  80.  
  81. conn:Disconnect()
  82.  
  83. if hidden and enabled then
  84.  
  85. if public then
  86.  
  87. saymsg:FireServer((publicItalics and "/me " or '').."{SPY} [".. p.Name .."]: "..msg,"All")
  88.  
  89. else
  90.  
  91. privateProperties.Text = "{SPY} [".. p.Name .."]: "..msg
  92.  
  93. StarterGui:SetCore("ChatMakeSystemMessage",privateProperties)
  94.  
  95. end
  96.  
  97. end
  98.  
  99. end
  100.  
  101. end
  102.  
  103. end
  104.  
  105.  
  106. for _,p in ipairs(Players:GetPlayers()) do
  107.  
  108. p.Chatted:Connect(function(msg) onChatted(p,msg) end)
  109.  
  110. end
  111.  
  112. Players.PlayerAdded:Connect(function(p)
  113.  
  114. p.Chatted:Connect(function(msg) onChatted(p,msg) end)
  115.  
  116. end)
  117.  
  118. privateProperties.Text = "{SPY "..(enabled and "EN" or "DIS").."ABLED}"
  119.  
  120. StarterGui:SetCore("ChatMakeSystemMessage",privateProperties)
  121.  
  122. local chatFrame = player.PlayerGui.Chat.Frame
  123.  
  124. chatFrame.ChatChannelParentFrame.Visible = true
  125.  
  126. chatFrame.ChatBarParentFrame.Position = chatFrame.ChatChannelParentFrame.Position+UDim2.new(UDim.new(),chatFrame.ChatChannelParentFrame.Size.Y)
  127.  
  128. --Credit to O Plays on Youtube, go subscribe to him (not my account, just advertising for him, we don't even know eachother lol)
  129.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement