Advertisement
DustyThomas

Storm Script?

Dec 18th, 2016
438
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.44 KB | None | 0 0
  1. local weather = {"Rain", "Thunder", "Fog", "Clear"}
  2.  
  3. local rand = math.random(1, #weather)
  4.  
  5. while true do
  6. if weather[rand] == "Thunder" then
  7. wait()
  8. game.Lighting.FogEnd = 300
  9. game.Lighting.FogColor = Color3.new(139/255, 139/255, 139/255)
  10. script.Parent.Cloud.Transparency = 0
  11. script.Parent.Thunder.Looped = True
  12. script.Parent.Thunder:Play()
  13. wait()
  14. print("Thunder Storm!")
  15. wait(100)
  16. script.Parent.Cloud.Transparency = 1
  17. script.Parent.Thunder.Looped = False
  18. game.Lighting.FogEnd = 1000
  19. end
  20. if weather[rand] == "Rain" then
  21. wait()
  22. game.Lighting.FogEnd = 200
  23. game.Lighting.FogColor = Color3.new(139/255, 139/255, 139/255)
  24. script.Parent.Cloud.Transparency = 0
  25. script.Parent.Wind.Looped = True
  26. script.Parent.Rain.Looped = True
  27. script.Parent.Rain:Play()
  28. script.Parent.Wind:Play()
  29. wait()
  30. print("Rain!")
  31. wait(400)
  32. script.Parent.Rain.Looped = False
  33. script.Parent.Wind.Looped = False
  34. script.Parent.Cloud.Transparency = 1
  35. game.Lighting.FogEnd = 1000
  36. end
  37. if weather[rand] == "Fog" then
  38. wait()
  39. game.Lighting.FogEnd = 100
  40. game.Lighting.FogColor = Color3.new(255, 255, 255)
  41. script.Parent.Wind.Looped = True
  42. script.Parent.Wind:Play()
  43. wait()
  44. print("Its foggy and cold out.")
  45. wait(100)
  46. script.Parent.Wind.Looped = False
  47. game.Lighting.FogEnd = 1000
  48. end
  49. if weather[rand] == "Clear" then
  50. wait()
  51. game.Lighting.FogEnd = 10000
  52. wait()
  53. print("The Weather is Clear!")
  54. wait(400)
  55. game.Lighting.FogEnd = 1000
  56. end
  57. wait()
  58. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement