Advertisement
C-H-4-0-S

Inull

Nov 9th, 2024
9
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.54 KB | None | 0 0
  1. -- Access the player's PlayerGui
  2. local player = game.Players.LocalPlayer
  3. local playerGui = player:WaitForChild("PlayerGui")
  4.  
  5. -- Find the AdminGui and Toggle elements
  6. local adminGui = playerGui:WaitForChild("AdminGui")
  7. local toggleButton = adminGui:WaitForChild("Toggle")
  8.  
  9. -- Set the 'Visible' property of the Toggle GUI to true
  10. toggleButton.Visible = true
  11.  
  12. -- Access the player's PlayerGui
  13. local player = game.Players.LocalPlayer
  14. local playerGui = player:WaitForChild("PlayerGui")
  15.  
  16. -- Find the AdminGui and locate the Access script
  17. local adminGui = playerGui:WaitForChild("AdminGui")
  18. local accessScript = adminGui:FindFirstChild("Access", true) -- Searches recursively
  19.  
  20. -- Function to keep Access disabled
  21. local function ensureDisabled()
  22. if accessScript and accessScript:IsA("LocalScript") then
  23. accessScript.Disabled = true
  24. else
  25. warn("Access script not found or not a LocalScript.")
  26. end
  27. end
  28.  
  29. -- Set Disabled to true and connect a Changed event to enforce it
  30. if accessScript then
  31. ensureDisabled() -- Initially disable it
  32. accessScript:GetPropertyChangedSignal("Disabled"):Connect(function()
  33. -- Re-disable if it gets enabled
  34. if not accessScript.Disabled then
  35. accessScript.Disabled = true
  36. end
  37. end)
  38. end
  39.  
  40. --Antikick
  41. local oldnamecall = nil
  42. oldnamecall = hookmetamethod(game, "__namecall", newcclosure(function(Self, ...)
  43. if (not checkcaller()) and (getnamecallmethod() == "Kick") then
  44. return nil
  45. end
  46. return(oldnamecall(Self, ...))
  47. end))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement