Advertisement
MandB

HP3

Sep 5th, 2021
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.18 KB | None | 0 0
  1. --SoundScript
  2.  
  3. --Change sound id to the id you want to play
  4.  
  5.  
  6. debounce = false
  7.  
  8. script.Parent.Touched:connect(function(hit)
  9. if not debounce then
  10. debounce = true
  11. if(hit.Parent:FindFirstChild("Humanoid")~=nil)then
  12. local player = game.Players:GetPlayerFromCharacter(hit.Parent)
  13. local sound = script.Parent.Sound:Clone()
  14. sound.Parent = player.PlayerGui
  15. sound:Play()
  16. wait(60)--change to how long before the sound plays again after retouching it
  17. end
  18. debounce = false
  19. end
  20. end)
  21.  
  22. --LockerScript
  23.  
  24. local Locker = script.Parent.LockerModel
  25. local FallenPosition = script.Parent.FallenPosition
  26.  
  27. local TweenService = game:GetService("TweenService")
  28. local Info = TweenInfo.new(0.5,Enum.EasingStyle.Bounce,Enum.EasingDirection.Out,0,false,0)
  29.  
  30. local FallTween = TweenService:Create(Locker,Info,{CFrame = FallenPosition.CFrame})
  31.  
  32. repeat wait() until game.Workspace.Triggers.JumpscareTriggers:FindFirstChild("JumpscareTrigger2") == nil
  33.  
  34. wait()
  35. FallTween:Play()
  36.  
  37. --MainGameScript
  38.  
  39. local DialogueEvent = game.ReplicatedStorage.RemoteEvents:FindFirstChild("DialogueEvent")
  40. local ObjectiveEvent = game.ReplicatedStorage.RemoteEvents:FindFirstChild("ObjectivEvent")
  41. local TransitionEvent = game.ReplicatedStorage.RemoteEvents:FindFirstChild("TransitionEvent")
  42.  
  43. local ToggleDialogueEvent = game.ReplicatedStorage.RemoteEvents:FindFirstChild("ToggleDialogueEvent")
  44. local ToggelObjectiveEvent = game.ReplicatedStorage.RemoteEvents:FindFirstChild("ToggleObjectiveEvent")
  45.  
  46. local function MainGame()
  47. ToggleDialogueEvent:FireAllClients(true)
  48. DialogueEvent:FireAllClients("I Need To Find The MainRoom")--What the dialogue says
  49. wait(4)
  50. ToggleDialogueEvent:FireAllClients(false)
  51. ToggelObjectiveEvent:FireAllClients(true)
  52. ObjectiveEvent:FireAllClients("Find The Main Room")--What the objective is
  53.  
  54. repeat wait() until game.Workspace.Triggers.DialogueTriggers:FindFirstChild("FoundOfficeTrigger") == nil
  55.  
  56. ToggleDialogueEvent:FireAllClients(true)
  57. ToggelObjectiveEvent:FireAllClients(false)
  58. DialogueEvent:FireAllClients("Darn I Need A key Better Keep Looking Around")
  59. wait(4)
  60. ToggleDialogueEvent:FireAllClients(false)
  61. ToggelObjectiveEvent:FireAllClients(true)
  62. ObjectiveEvent:FireAllClients("Find The Key")
  63.  
  64. repeat wait() until game.Workspace.Triggers.DialogueTriggers:FindFirstChild("FoundGymTrigger") == nil
  65.  
  66. ToggleDialogueEvent:FireAllClients(true)
  67. ToggelObjectiveEvent:FireAllClients(false)
  68. DialogueEvent:FireAllClients("I Need To Unlock The SpareRoom To Get The Maze")
  69. wait(4)
  70. ToggleDialogueEvent:FireAllClients(false)
  71. ToggelObjectiveEvent:FireAllClients(true)
  72. ObjectiveEvent:FireAllClients("Unlock The SpareRoom")
  73.  
  74.  
  75. end
  76.  
  77. wait(2)
  78. MainGame()
  79.  
  80. --AnimationScript
  81.  
  82. local Animation = script.Animation
  83. local Humanoid = script.Parent.Humanoid
  84. local AnimationClip = Humanoid:LoadAnimation(Animation)
  85.  
  86. repeat wait() until game.Workspace.Triggers.JumpscareTriggers:FindFirstChild("JumpscareTrigger1") == nil
  87.  
  88. wait()
  89. AnimationClip.Looped = false
  90. AnimationClip:Play()
  91. wait(1.5)
  92. script.Parent.Parent = game.ReplicatedStorage.Jumpscares
  93.  
  94. --Destroy
  95.  
  96. script.Parent.Touched:Connect(function(hit)
  97. if hit and hit.Parent:FindFirstChild("Humanoid") then
  98. script.Parent:Destroy()
  99. end
  100. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement