Advertisement
Roblox_Scripts6969

Jumpscare script

Nov 11th, 2023
1,811
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. -- Roblox Jump Scare Script
  2. -- Put this in a Script in workspace btw. [this wont pop up a gui you have to add it sorry :(]!!!!!!!!!!
  3. -- Get services
  4. local Workspace = game:GetService("Workspace")
  5.  
  6. -- Create a part for the jump scare trigger
  7. local jumpScareTrigger = Instance.new("Part", Workspace)
  8. jumpScareTrigger.Name = "JumpScareTrigger"
  9. jumpScareTrigger.Size = Vector3.new(10, 10, 10) -- adjust size as needed
  10. jumpScareTrigger.Position = Vector3.new(0, 0, 0) -- adjust position as needed
  11. jumpScareTrigger.Transparency = 0 -- make the part Visible
  12. jumpScareTrigger.Anchored = true
  13. jumpScareTrigger.CanCollide = false
  14.  
  15. -- Create a sound for the jump scare
  16. local jumpScareSound = Instance.new("Sound", jumpScareTrigger)
  17. jumpScareSound.SoundId = "rbxassetid://your_sound_id_here" -- replace with your own sound id
  18. jumpScareSound.Volume = 1
  19.  
  20. -- Function to play the jump scare sound
  21. local function playJumpScare(player)
  22. jumpScareSound:Play()
  23. print(player.Name .. " triggered the jump scare!")
  24. end
  25.  
  26. -- Connect the function to the part's Touched event
  27. jumpScareTrigger.Touched:Connect(playJumpScare)
  28.  
  29. print("Made by nightmareYoda222")
Tags: Roblox Script
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement