0% found this document useful (0 votes)
169 views2 pages

Untitled

This script allows the player to spy on hidden chat messages in Roblox games. It connects to the chat events to detect hidden messages. When a message is detected as hidden, the script will output the message to either public or private chat based on settings. Settings can be toggled on/off with the "/spy" command and include enabling spying, spying on one's own messages, and making spy messages public or keeping them private.

Uploaded by

Maksim Savtyk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
169 views2 pages

Untitled

This script allows the player to spy on hidden chat messages in Roblox games. It connects to the chat events to detect hidden messages. When a message is detected as hidden, the script will output the message to either public or private chat based on settings. Settings can be toggled on/off with the "/spy" command and include enabling spying, spying on one's own messages, and making spy messages public or keeping them private.

Uploaded by

Maksim Savtyk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

--This script reveals ALL hidden messages in the default chat

--chat "/spy" to toggle!


enabled = true
--if true will check your messages too
spyOnMyself = false
--if true will chat the logs publicly (fun, risky)
public = false
--if true will use /me to stand out
publicItalics = true
--customize private logs
privateProperties = {
Color = Color3.fromRGB(0,255,255);
Font = Enum.Font.SourceSansBold;
TextSize = 18;
}
--////////////////////////////////////////////////////////////////
local StarterGui = game:GetService("StarterGui")
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local saymsg =
game:GetService("ReplicatedStorage"):WaitForChild("DefaultChatSystemChatEvents"):Wa
itForChild("SayMessageRequest")
local getmsg =
game:GetService("ReplicatedStorage"):WaitForChild("DefaultChatSystemChatEvents"):Wa
itForChild("OnMessageDoneFiltering")
local instance = (_G.chatSpyInstance or 0) + 1
_G.chatSpyInstance = instance

local function onChatted(p,msg)


if _G.chatSpyInstance == instance then
if p==player and msg:lower():sub(1,4)=="/spy" then
enabled = not enabled
wait(0.3)
privateProperties.Text = "{SPY "..(enabled and "EN" or
"DIS").."ABLED}"
StarterGui:SetCore("ChatMakeSystemMessage",privateProperties)
elseif enabled and (spyOnMyself==true or p~=player) then
msg = msg:gsub("[\n\r]",''):gsub("\t",' '):gsub("[ ]+",' ')
local hidden = true
local conn =
getmsg.OnClientEvent:Connect(function(packet,channel)
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
hidden = false
end
end)
wait(1)
conn:Disconnect()
if hidden and enabled then
if public then
saymsg:FireServer((publicItalics and "/me " or
'').."{SPY} [".. p.Name .."]: "..msg,"All")
else
privateProperties.Text = "{SPY} [".. p.Name .."]:
"..msg

StarterGui:SetCore("ChatMakeSystemMessage",privateProperties)
end
end
end
end
end

for _,p in ipairs(Players:GetPlayers()) do


p.Chatted:Connect(function(msg) onChatted(p,msg) end)
end
Players.PlayerAdded:Connect(function(p)
p.Chatted:Connect(function(msg) onChatted(p,msg) end)
end)
privateProperties.Text = "{SPY "..(enabled and "EN" or "DIS").."ABLED}"
StarterGui:SetCore("ChatMakeSystemMessage",privateProperties)
local chatFrame = player.PlayerGui.Chat.Frame
chatFrame.ChatChannelParentFrame.Visible = true
chatFrame.ChatBarParentFrame.Position =
chatFrame.ChatChannelParentFrame.Position+UDim2.new(UDim.new(),chatFrame.ChatChanne
lParentFrame.Size.Y)

You might also like