Advertisement
MandB

H G

Sep 20th, 2021
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.98 KB | None | 0 0
  1. --ScreenGui Script
  2.  
  3. local TweenService = game:GetService("TweenService")
  4. local Info = TweenInfo.new(1)
  5.  
  6. local Player = game.Players.LocalPlayer
  7. local RemoteEvent = game.ReplicatedStorage.RemoteEvents.ExitEvent
  8.  
  9. local ScreenGui = Player.PlayerGui:WaitForChild("ScreenGui")
  10. local Frame = ScreenGui:WaitForChild("Frame")
  11. local TextLabel = Frame:WaitForChild("TextLabel")
  12. local TextButton = Frame:WaitForChild("TextButton")
  13.  
  14. local FrameVisible = {}
  15. local TextVisible = {}
  16. local ButtonVisible = {}
  17.  
  18. FrameVisible.BackgroundTransparency = 0
  19. TextVisible.TextTransparency = 0
  20. ButtonVisible.TextTransparency = 0
  21.  
  22. RemoteEvent.OnClientEvent:Connect(function()
  23. TextButton.Visible = true
  24. TweenService:Create(Frame,Info,FrameVisible):Play()
  25. TweenService:Create(TextLabel,Info,TextVisible):Play()
  26. TweenService:Create(TextButton,Info,ButtonVisible):Play()
  27. end)
  28.  
  29. --ServerScriptService
  30.  
  31.  
  32. local DialogueEvent = game.ReplicatedStorage.RemoteEvents:FindFirstChild("DialogueEvent")
  33. local ObjectiveEvent = game.ReplicatedStorage.RemoteEvents:FindFirstChild("ObjectivEvent")
  34. local TransitionEvent = game.ReplicatedStorage.RemoteEvents:FindFirstChild("TransitionEvent")
  35.  
  36. local ToggleDialogueEvent = game.ReplicatedStorage.RemoteEvents:FindFirstChild("ToggleDialogueEvent")
  37. local ToggelObjectiveEvent = game.ReplicatedStorage.RemoteEvents:FindFirstChild("ToggleObjectiveEvent")
  38.  
  39. local IntroEvent = game.ReplicatedStorage.RemoteEvents:FindFirstChild("IntroEvent")
  40.  
  41. local function Teleport(Position)
  42. local Players = game.Players:GetPlayers()
  43.  
  44. for i, player in pairs(Players) do
  45. if player.Character then
  46. player.Character.Humanoid.Jump = true
  47. player.Character:SetPrimaryPartCFrame(Position)
  48. end
  49. end
  50. end
  51.  
  52.  
  53.  
  54. local function MainGame()
  55. ToggleDialogueEvent:FireAllClients(true)
  56. DialogueEvent:FireAllClients("I Need To Find The MainRoom")--What the dialogue says
  57. wait(4)
  58. ToggleDialogueEvent:FireAllClients(false)
  59. ToggelObjectiveEvent:FireAllClients(true)
  60. ObjectiveEvent:FireAllClients("Find The Main Room")--What the objective is
  61.  
  62. repeat wait() until game.Workspace.Triggers.DialogueTriggers:FindFirstChild("FoundOfficeTrigger") == nil
  63.  
  64. ToggleDialogueEvent:FireAllClients(true)
  65. ToggelObjectiveEvent:FireAllClients(false)
  66. DialogueEvent:FireAllClients("Darn I Need A key Better Keep Looking Around")
  67. wait(4)
  68. ToggleDialogueEvent:FireAllClients(false)
  69. ToggelObjectiveEvent:FireAllClients(true)
  70. ObjectiveEvent:FireAllClients("Find The Key")
  71.  
  72. repeat wait() until game.Workspace.Triggers.DialogueTriggers:FindFirstChild("FoundGymTrigger") == nil
  73.  
  74. ToggleDialogueEvent:FireAllClients(true)
  75. ToggelObjectiveEvent:FireAllClients(false)
  76. DialogueEvent:FireAllClients("I Need To Unlock The SpareRoom To Get The Maze")
  77. wait(4)
  78. ToggleDialogueEvent:FireAllClients(false)
  79. ToggelObjectiveEvent:FireAllClients(true)
  80. ObjectiveEvent:FireAllClients("Unlock The SpareRoom")
  81.  
  82.  
  83.  
  84.  
  85.  
  86. repeat wait() until game.Workspace.Triggers.DialogueTriggers:FindFirstChild("GymTrigger") == nil
  87.  
  88. TransitionEvent:FireAllClients()
  89. wait(2)
  90. Teleport(game.Workspace.TeleportPoints.MazeTeleport.CFrame)
  91.  
  92.  
  93.  
  94.  
  95. repeat wait() until game.Workspace.Triggers.DialogueTriggers:FindFirstChild("MazeDoorTrigger") == nil
  96.  
  97. TransitionEvent:FireAllClients()
  98. wait(2)
  99. Teleport(game.Workspace.TeleportPoints.MazeExitTeleport.CFrame)
  100.  
  101.  
  102. end
  103.  
  104. wait(2)
  105. MainGame()
  106.  
  107. game.Players.PlayerAdded:Connect(function(Player)
  108. IntroEvent:FireClient(Player)
  109. end)
  110.  
  111. --TextButtonScript
  112.  
  113. local TeleportService = game:GetService("TeleportService")
  114.  
  115. script.Parent.MouseButton1Click:Connect(function()
  116. TeleportService:Teleport(7422428005)
  117. end)
  118.  
  119. --Line1
  120.  
  121. local LinesDone = script.Parent.Parent.Parent.LinesDone
  122.  
  123. script.Parent.ClickDetector.MouseClick:Connect(function()
  124. script.Parent.Orientation += Vector3.new(22.5,0,0)
  125.  
  126. if script.Parent.Orientation.X == 0 or script.Parent.Orientation.X == 180 then
  127. LinesDone.Value = LinesDone.Value + 1
  128. script.Parent.BrickColor = BrickColor.new(0,255,0)
  129. script.Disabled = true
  130. end
  131. end)
  132.  
  133. --Line2
  134.  
  135. local LinesDone = script.Parent.Parent.Parent.LinesDone
  136.  
  137. script.Parent.ClickDetector.MouseClick:Connect(function()
  138. script.Parent.Orientation += Vector3.new(22.5,0,0)
  139.  
  140. if script.Parent.Orientation.X == 90 or script.Parent.Orientation.X == -90 then
  141. LinesDone.Value = LinesDone.Value + 1
  142. script.Parent.BrickColor = BrickColor.new(0,255,0)
  143. script.Disabled = true
  144. end
  145. end)
  146.  
  147. --Line3
  148.  
  149. local LinesDone = script.Parent.Parent.Parent.LinesDone
  150.  
  151. script.Parent.ClickDetector.MouseClick:Connect(function()
  152. script.Parent.Orientation += Vector3.new(22.5,0,0)
  153.  
  154. if script.Parent.Orientation.X == 90 or script.Parent.Orientation.X == -90 then
  155. LinesDone.Value = LinesDone.Value + 1
  156. script.Parent.BrickColor = BrickColor.new(0,255,0)
  157. script.Disabled = true
  158. end
  159. end)
  160.  
  161. --MainScript
  162.  
  163. local LinesDone = script.Parent.LinesDone
  164.  
  165. repeat wait() until LinesDone.Value == 3
  166.  
  167. script.Parent.Door:Destroy()
  168. game.ReplicatedStorage.RemoteEvents.CutsheneEvent:FireAllClients()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement