MaxproGlitcher

protect Gui

Dec 2nd, 2025
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. local screenGui = Instance.new("ScreenGui", game:GetService("CoreGui"))
  2.  
  3. -- Attempting to create a parent to a protected location
  4. pcall(function()
  5. if gethui then
  6. screenGui.Parent = gethui()
  7. elseif syn and syn.protect_gui then
  8. syn.protect_gui(screenGui)
  9. screenGui.Parent = game:GetService("CoreGui")
  10. else
  11. screenGui.Parent = game:GetService("CoreGui")
  12. end
  13. end)
  14.  
  15. if not screenGui.Parent then
  16. screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  17. end
  18.  
Advertisement
Add Comment
Please, Sign In to add comment