Advertisement
anphu04

Spawn bricks v2

Jul 6th, 2017
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. wait(1)
  2.  
  3.  
  4. function insert()
  5.  
  6. --[[--This call will cause a "wait" until the data comes back
  7. local root = game:GetService("InsertService"):LoadAsset(modelID)
  8.  
  9.  
  10. local instances = root:GetChildren()
  11. if #instances == 0 then
  12. root:Remove()
  13. return
  14. end
  15.  
  16. --Continue the insert process
  17. root.Name = "InsertedObject" .. modelID
  18.  
  19. game:GetService("InsertService"):Insert(root)
  20.  
  21. root:MoveTo(Vector3.new(0,50,0))]]--
  22.  
  23. local part = Instance.new("Part", game.Workspace)
  24. part.Name = "ClonedPart"
  25. part.Size = Vector3.new(10,10,10)
  26. part.BrickColor = BrickColor.Random()
  27. part.TopSurface = "Smooth"
  28. part.BottomSurface = "Smooth"
  29. part.Position = Vector3.new(math.random(-500,500), math.random(100,200), math.random(-500,500))
  30.  
  31. local sound = Instance.new("Sound", part)
  32. sound.Looped = true -- tick to true = RIP EARS
  33. sound.MaxDistance = 10000000000
  34. sound.EmitterSize = 10000
  35. sound.SoundId = "rbxassetid://12221967"
  36. sound.Name = "SampleSound"
  37. sound.PlayOnRemove = true
  38. sound.Volume = 1
  39. local randompitch = math.random(12,15)
  40. randompitch = randompitch / 10
  41. sound.Pitch = randompitch
  42. sound:Play()
  43.  
  44. end
  45.  
  46.  
  47. while true do
  48. insert()
  49. wait(0.1)
  50. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement