Advertisement
rrixh

spy

Jul 30th, 2023 (edited)
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.68 KB | None | 0 0
  1. enabled = true
  2. --if true will xhexk your messages too
  3. spyOnMyself = true
  4. --if true will xhat the logs publikly (fun, risky)
  5. public = false
  6. --if true will use /me to stand out
  7. publicItalics = false
  8. --KUSTOMIZE private logs
  9. privateProperties = {
  10. Color = Color3.fromRGB(0,255,255);
  11. Font = Enum.Font.SourceSansBold;
  12. TextSize = 18;
  13. }
  14. --////////////////////////////////////////////////////////////////
  15. local StarterGui = game:GetService("StarterGui")
  16. local Players = game:GetService("Players")
  17. local player = Players.LocalPlayer or Players:GetPropertyChangedSignal("LocalPlayer"):Wait() or Players.LocalPlayer
  18. local saymsg = game:GetService("ReplicatedStorage"):WaitForChild("DefaultChatSystemChatEvents"):WaitForChild("SayMessageRequest")
  19. local getmsg = game:GetService("ReplicatedStorage"):WaitForChild("DefaultChatSystemChatEvents"):WaitForChild("OnMessageDoneFiltering")
  20. local instance = (_G.chatSpyInstance or 0) + 1
  21. _G.chatSpyInstance = instance
  22.  
  23. local function onChatted(p,msg)
  24. if _G.chatSpyInstance == instance then
  25. if p==player and msg:lower():sub(1,6)==".lu" then
  26. enabled = not enabled
  27. wait(0.3)
  28. privateProperties.Text = "{LOLLYPOP SPY "..(enabled and "EN" or "DIS").."ABLED}"
  29. StarterGui:SetCore("ChatMakeSystemMessage",privateProperties)
  30. elseif enabled and (spyOnMyself==true or p~=player) then
  31. msg = msg:gsub("[\n\r]",''):gsub("\t",' '):gsub("[ ]+",' ')
  32. local hidden = true
  33. local conn = getmsg.OnClientEvent:Connect(function(packet,channel)
  34. if packet.SpeakerUserId==p.UserId and packet.Message==msg:sub(#msg-#packet.Message+1) and (channel=="All" or (channel=="Team" and public==false and p.Team==player.Team)) then
  35. hidden = false
  36. end
  37. end)
  38. wait(1)
  39. conn:Disconnect()
  40. if hidden and enabled then
  41. if public then
  42. saymsg:FireServer((publicItalics and "/me " or '').."{SPY} [".. p.Name .."]: "..msg,"All")
  43. else
  44. privateProperties.Text = "{SPY} [".. p.Name .."]: "..msg
  45. StarterGui:SetCore("ChatMakeSystemMessage",privateProperties)
  46. end
  47. end
  48. end
  49. end
  50. end
  51.  
  52. for _,p in ipairs(Players:GetPlayers()) do
  53. p.Chatted:Connect(function(msg) onChatted(p,msg) end)
  54. end
  55. Players.PlayerAdded:Connect(function(p)
  56. p.Chatted:Connect(function(msg) onChatted(p,msg) end)
  57. end)
  58. privateProperties.Text = "{LOLLYPOP SPY "..(enabled and "EN" or "DIS").."ABLED}"
  59. player:WaitForChild("PlayerGui"):WaitForChild("Chat")
  60. StarterGui:SetCore("ChatMakeSystemMessage",privateProperties)
  61. wait(3)
  62. local chatFrame = player.PlayerGui.Chat.Frame
  63. chatFrame.ChatChannelParentFrame.Visible = true
  64. chatFrame.ChatBarParentFrame.Position = chatFrame.ChatChannelParentFrame.Position+UDim2.new(UDim.new(),chatFrame.ChatChannelParentFrame.Size.Y)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement