Sungmingamerpro13

Story Game Lobby LeaveButtonScript

Mar 7th, 2026
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 0.40 KB | None | 0 0
  1. local leaveGuiEvent = game.ReplicatedStorage.LeaveGuiEvent
  2. local player = game.Players.LocalPlayer
  3. player.CameraMaxZoomDistance = 50
  4.  
  5. leaveGuiEvent.OnClientEvent:Connect(function()
  6.     player.PlayerGui.MainGui.leaveButton.Visible = true
  7. end)
  8.  
  9. player.PlayerGui.MainGui.leaveButton.MouseButton1Down:connect(function()
  10.     leaveGuiEvent:FireServer()
  11.     player.PlayerGui.MainGui.leaveButton.Visible = false
  12. end)
  13.  
Add Comment
Please, Sign In to add comment