Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print ("Storm Loaded")
- function doThunder()
- local storm_sound = nil
- if math.random() < .5 then
- storm_sound = game.Workspace:findFirstChild("ThunderSound")
- if storm_sound == nil then
- storm_sound = Instance.new("Sound")
- storm_sound.Name = "ThunderSound"
- storm_sound.SoundId = "rbxasset://sounds\\HalloweenThunder.wav"
- storm_sound.Parent = game.Workspace
- end
- else
- storm_sound = game.Workspace:findFirstChild("LightningSound")
- if storm_sound == nil then
- storm_sound = Instance.new("Sound")
- storm_sound.Name = "LightningSound"
- storm_sound.SoundId = "rbxasset://sounds\\HalloweenLightning.wav"
- storm_sound.Parent = game.Workspace
- end
- end
- storm_sound:play()
- end
- function MakeMeteor()
- local m = Instance.new("Part")
- m.Shape = math.random(0,1)
- local s = math.random(4, 30)
- m.Size = Vector3.new(s,s,s)
- m.BottomSurface = 0
- m.TopSurface = 0
- m.BrickColor = BrickColor.Random()
- 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()))
- local b = Instance.new("BodyForce")
- b.Parent = m
- b.force = Vector3.new(0, m:GetMass() * 120, 0)
- m.Parent = game.Workspace
- end
- function MakeSticks()
- local m = Instance.new("Part")
- m.Shape = 1
- local s = math.random(20, 100)
- local w = math.random(2,4)
- m.Size = Vector3.new(w,s,w)
- m.BottomSurface = 0
- m.TopSurface = 0
- m.BrickColor = BrickColor.Random()
- 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)))
- local b = Instance.new("BodyForce")
- b.Parent = m
- b.force = Vector3.new(0, m:GetMass() * 120, 0)
- m.Parent = game.Workspace
- end
- while true do
- wait(math.random(5,35))
- local n = math.random(1,7)
- local t = math.random(0,1)
- for i = 1,n do
- doThunder()
- if t == 0 then MakeMeteor() else MakeSticks() end
- wait(math.random() * 3)
- end
- end
Add Comment
Please, Sign In to add comment