Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --ScreenGui Script
- local TweenService = game:GetService("TweenService")
- local Info = TweenInfo.new(1)
- local Player = game.Players.LocalPlayer
- local RemoteEvent = game.ReplicatedStorage.RemoteEvents.ExitEvent
- local ScreenGui = Player.PlayerGui:WaitForChild("ScreenGui")
- local Frame = ScreenGui:WaitForChild("Frame")
- local TextLabel = Frame:WaitForChild("TextLabel")
- local TextButton = Frame:WaitForChild("TextButton")
- local FrameVisible = {}
- local TextVisible = {}
- local ButtonVisible = {}
- FrameVisible.BackgroundTransparency = 0
- TextVisible.TextTransparency = 0
- ButtonVisible.TextTransparency = 0
- RemoteEvent.OnClientEvent:Connect(function()
- TextButton.Visible = true
- TweenService:Create(Frame,Info,FrameVisible):Play()
- TweenService:Create(TextLabel,Info,TextVisible):Play()
- TweenService:Create(TextButton,Info,ButtonVisible):Play()
- end)
- --ServerScriptService
- local DialogueEvent = game.ReplicatedStorage.RemoteEvents:FindFirstChild("DialogueEvent")
- local ObjectiveEvent = game.ReplicatedStorage.RemoteEvents:FindFirstChild("ObjectivEvent")
- local TransitionEvent = game.ReplicatedStorage.RemoteEvents:FindFirstChild("TransitionEvent")
- local ToggleDialogueEvent = game.ReplicatedStorage.RemoteEvents:FindFirstChild("ToggleDialogueEvent")
- local ToggelObjectiveEvent = game.ReplicatedStorage.RemoteEvents:FindFirstChild("ToggleObjectiveEvent")
- local IntroEvent = game.ReplicatedStorage.RemoteEvents:FindFirstChild("IntroEvent")
- local function Teleport(Position)
- local Players = game.Players:GetPlayers()
- for i, player in pairs(Players) do
- if player.Character then
- player.Character.Humanoid.Jump = true
- player.Character:SetPrimaryPartCFrame(Position)
- end
- end
- end
- local function MainGame()
- ToggleDialogueEvent:FireAllClients(true)
- DialogueEvent:FireAllClients("I Need To Find The MainRoom")--What the dialogue says
- wait(4)
- ToggleDialogueEvent:FireAllClients(false)
- ToggelObjectiveEvent:FireAllClients(true)
- ObjectiveEvent:FireAllClients("Find The Main Room")--What the objective is
- repeat wait() until game.Workspace.Triggers.DialogueTriggers:FindFirstChild("FoundOfficeTrigger") == nil
- ToggleDialogueEvent:FireAllClients(true)
- ToggelObjectiveEvent:FireAllClients(false)
- DialogueEvent:FireAllClients("Darn I Need A key Better Keep Looking Around")
- wait(4)
- ToggleDialogueEvent:FireAllClients(false)
- ToggelObjectiveEvent:FireAllClients(true)
- ObjectiveEvent:FireAllClients("Find The Key")
- repeat wait() until game.Workspace.Triggers.DialogueTriggers:FindFirstChild("FoundGymTrigger") == nil
- ToggleDialogueEvent:FireAllClients(true)
- ToggelObjectiveEvent:FireAllClients(false)
- DialogueEvent:FireAllClients("I Need To Unlock The SpareRoom To Get The Maze")
- wait(4)
- ToggleDialogueEvent:FireAllClients(false)
- ToggelObjectiveEvent:FireAllClients(true)
- ObjectiveEvent:FireAllClients("Unlock The SpareRoom")
- repeat wait() until game.Workspace.Triggers.DialogueTriggers:FindFirstChild("GymTrigger") == nil
- TransitionEvent:FireAllClients()
- wait(2)
- Teleport(game.Workspace.TeleportPoints.MazeTeleport.CFrame)
- repeat wait() until game.Workspace.Triggers.DialogueTriggers:FindFirstChild("MazeDoorTrigger") == nil
- TransitionEvent:FireAllClients()
- wait(2)
- Teleport(game.Workspace.TeleportPoints.MazeExitTeleport.CFrame)
- end
- wait(2)
- MainGame()
- game.Players.PlayerAdded:Connect(function(Player)
- IntroEvent:FireClient(Player)
- end)
- --TextButtonScript
- local TeleportService = game:GetService("TeleportService")
- script.Parent.MouseButton1Click:Connect(function()
- TeleportService:Teleport(7422428005)
- end)
- --Line1
- local LinesDone = script.Parent.Parent.Parent.LinesDone
- script.Parent.ClickDetector.MouseClick:Connect(function()
- script.Parent.Orientation += Vector3.new(22.5,0,0)
- if script.Parent.Orientation.X == 0 or script.Parent.Orientation.X == 180 then
- LinesDone.Value = LinesDone.Value + 1
- script.Parent.BrickColor = BrickColor.new(0,255,0)
- script.Disabled = true
- end
- end)
- --Line2
- local LinesDone = script.Parent.Parent.Parent.LinesDone
- script.Parent.ClickDetector.MouseClick:Connect(function()
- script.Parent.Orientation += Vector3.new(22.5,0,0)
- if script.Parent.Orientation.X == 90 or script.Parent.Orientation.X == -90 then
- LinesDone.Value = LinesDone.Value + 1
- script.Parent.BrickColor = BrickColor.new(0,255,0)
- script.Disabled = true
- end
- end)
- --Line3
- local LinesDone = script.Parent.Parent.Parent.LinesDone
- script.Parent.ClickDetector.MouseClick:Connect(function()
- script.Parent.Orientation += Vector3.new(22.5,0,0)
- if script.Parent.Orientation.X == 90 or script.Parent.Orientation.X == -90 then
- LinesDone.Value = LinesDone.Value + 1
- script.Parent.BrickColor = BrickColor.new(0,255,0)
- script.Disabled = true
- end
- end)
- --MainScript
- local LinesDone = script.Parent.LinesDone
- repeat wait() until LinesDone.Value == 3
- script.Parent.Door:Destroy()
- game.ReplicatedStorage.RemoteEvents.CutsheneEvent:FireAllClients()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement