Hasli4

Untitled

Nov 1st, 2026
30
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.14 KB | None | 0 0
  1.  
  2. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  3.  
  4. --------------------------------------------------
  5. -- RemoteEvents
  6. --------------------------------------------------
  7.  
  8. local showEscapeNotice =
  9. ReplicatedStorage:WaitForChild("ShowEscapeNotice")
  10.  
  11. local startEscapeTimer =
  12. ReplicatedStorage:WaitForChild("StartEscapeTimer")
  13.  
  14.  
  15. --------------------------------------------------
  16. -- GUI
  17. --------------------------------------------------
  18.  
  19. local gui = script.Parent
  20.  
  21. local frame = gui:WaitForChild("Frame")
  22.  
  23. local messageText =
  24. frame:WaitForChild("MessageText")
  25.  
  26. local acknowledgeButton =
  27. frame:WaitForChild("AcknowledgeButton")
  28.  
  29. local buttonText =
  30. acknowledgeButton:WaitForChild("ButtonText")
  31.  
  32.  
  33. --------------------------------------------------
  34. -- Состояние
  35. --------------------------------------------------
  36.  
  37. local noticeOpened = false
  38.  
  39.  
  40. --------------------------------------------------
  41. -- Скрываем табличку при запуске
  42. --------------------------------------------------
  43.  
  44. gui.Enabled = false
  45.  
  46.  
  47. --------------------------------------------------
  48. -- Показываем табличку
  49. --------------------------------------------------
  50.  
  51. showEscapeNotice.OnClientEvent:Connect(function()
  52.  
  53. print("[ESCAPE NOTICE] Табличка показана")
  54.  
  55. messageText.Text = "Вы можете сбежать"
  56.  
  57. buttonText.Text = "Понятно"
  58.  
  59. gui.Enabled = true
  60.  
  61. noticeOpened = true
  62.  
  63. end)
  64.  
  65.  
  66. --------------------------------------------------
  67. -- Кнопка «Понятно»
  68. --------------------------------------------------
  69.  
  70. acknowledgeButton.Activated:Connect(function()
  71.  
  72. if not noticeOpened then
  73. return
  74. end
  75.  
  76. noticeOpened = false
  77.  
  78. print("[ESCAPE NOTICE] Нажато «Понятно»")
  79.  
  80.  
  81. --------------------------------------------------
  82. -- Убираем табличку
  83. --------------------------------------------------
  84.  
  85. gui.Enabled = false
  86.  
  87.  
  88. --------------------------------------------------
  89. -- Запускаем таймер
  90. --------------------------------------------------
  91.  
  92. startEscapeTimer:FireServer()
  93.  
  94. end)
  95.  
Advertisement
Add Comment
Please, Sign In to add comment