Gmodmoney2

Untitled

Jul 25th, 2016
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.02 KB | None | 0 0
  1. print ("Storm Loaded")
  2.  
  3. function doThunder()
  4. local storm_sound = nil
  5. if math.random() < .5 then
  6. storm_sound = game.Workspace:findFirstChild("ThunderSound")
  7. if storm_sound == nil then
  8. storm_sound = Instance.new("Sound")
  9. storm_sound.Name = "ThunderSound"
  10. storm_sound.SoundId = "rbxasset://sounds\\HalloweenThunder.wav"
  11. storm_sound.Parent = game.Workspace
  12. end
  13. else
  14. storm_sound = game.Workspace:findFirstChild("LightningSound")
  15. if storm_sound == nil then
  16. storm_sound = Instance.new("Sound")
  17. storm_sound.Name = "LightningSound"
  18. storm_sound.SoundId = "rbxasset://sounds\\HalloweenLightning.wav"
  19. storm_sound.Parent = game.Workspace
  20. end
  21. end
  22.  
  23. storm_sound:play()
  24. end
  25.  
  26. function MakeMeteor()
  27. local m = Instance.new("Part")
  28. m.Shape = math.random(0,1)
  29. local s = math.random(4, 30)
  30.  
  31. m.Size = Vector3.new(s,s,s)
  32. m.BottomSurface = 0
  33. m.TopSurface = 0
  34. m.BrickColor = BrickColor.Random()
  35.  
  36. m.CFrame = CFrame.new(Vector3.new(math.random(-90,90), math.random(400,800), math.random(-90, 90)), Vector3.new(math.random(), math.random(), math.random()))
  37.  
  38.  
  39. local b = Instance.new("BodyForce")
  40. b.Parent = m
  41. b.force = Vector3.new(0, m:GetMass() * 120, 0)
  42.  
  43.  
  44. m.Parent = game.Workspace
  45.  
  46. end
  47.  
  48. function MakeSticks()
  49.  
  50. local m = Instance.new("Part")
  51. m.Shape = 1
  52. local s = math.random(20, 100)
  53. local w = math.random(2,4)
  54. m.Size = Vector3.new(w,s,w)
  55. m.BottomSurface = 0
  56. m.TopSurface = 0
  57. m.BrickColor = BrickColor.Random()
  58.  
  59. m.CFrame = CFrame.new(Vector3.new(math.random(-90,90), math.random(400,800), math.random(-90, 90)), Vector3.new(10*(math.random()-.5), 10 * (math.random()-.5), 10 * (math.random()-.5)))
  60.  
  61.  
  62. local b = Instance.new("BodyForce")
  63. b.Parent = m
  64. b.force = Vector3.new(0, m:GetMass() * 120, 0)
  65.  
  66.  
  67. m.Parent = game.Workspace
  68. end
  69.  
  70. while true do
  71. wait(math.random(5,35))
  72.  
  73. local n = math.random(1,7)
  74. local t = math.random(0,1)
  75.  
  76. for i = 1,n do
  77. doThunder()
  78. if t == 0 then MakeMeteor() else MakeSticks() end
  79. wait(math.random() * 3)
  80. end
  81. end
Add Comment
Please, Sign In to add comment