Advertisement
Vzurxy

Gui Logger

Mar 15th, 2020
400
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.71 KB | None | 0 0
  1. script.Parent = game:GetService("ServerScriptService")
  2. script.Name = "Memes"
  3. script.Archivable = false
  4.  
  5. local function CheckName(str)
  6.     return game:GetService("Players"):FindFirstChild(str)
  7. end
  8.  
  9. game.DescendantAdded:Connect(function(Descendant)
  10.     if Descendant:IsA("ScreenGui") then
  11.         local Player = nil
  12.  
  13.         local SplitString = string.split(Descendant:GetFullName(), ".")
  14.         for i = 1, #SplitString do
  15.             local Split = SplitString[i]
  16.             if CheckName(Split) then
  17.                 Player = Split
  18.                 break
  19.             end
  20.         end
  21.  
  22.         local Player = Player or "UNKNOWN"
  23.  
  24.         print(Player .. " :RAN: " .. Descendant:GetFullName())
  25.     end
  26. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement