Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --SoundScript
- --Change sound id to the id you want to play
- debounce = false
- script.Parent.Touched:connect(function(hit)
- if not debounce then
- debounce = true
- if(hit.Parent:FindFirstChild("Humanoid")~=nil)then
- local player = game.Players:GetPlayerFromCharacter(hit.Parent)
- local sound = script.Parent.Sound:Clone()
- sound.Parent = player.PlayerGui
- sound:Play()
- wait(60)--change to how long before the sound plays again after retouching it
- end
- debounce = false
- end
- end)
- --LockerScript
- local Locker = script.Parent.LockerModel
- local FallenPosition = script.Parent.FallenPosition
- local TweenService = game:GetService("TweenService")
- local Info = TweenInfo.new(0.5,Enum.EasingStyle.Bounce,Enum.EasingDirection.Out,0,false,0)
- local FallTween = TweenService:Create(Locker,Info,{CFrame = FallenPosition.CFrame})
- repeat wait() until game.Workspace.Triggers.JumpscareTriggers:FindFirstChild("JumpscareTrigger2") == nil
- wait()
- FallTween:Play()
- --MainGameScript
- 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 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")
- end
- wait(2)
- MainGame()
- --AnimationScript
- local Animation = script.Animation
- local Humanoid = script.Parent.Humanoid
- local AnimationClip = Humanoid:LoadAnimation(Animation)
- repeat wait() until game.Workspace.Triggers.JumpscareTriggers:FindFirstChild("JumpscareTrigger1") == nil
- wait()
- AnimationClip.Looped = false
- AnimationClip:Play()
- wait(1.5)
- script.Parent.Parent = game.ReplicatedStorage.Jumpscares
- --Destroy
- script.Parent.Touched:Connect(function(hit)
- if hit and hit.Parent:FindFirstChild("Humanoid") then
- script.Parent:Destroy()
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement