EsTLation

rain edited

Jul 22nd, 2020
287
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.03 KB | None | 0 0
  1. --// CREATED BY ESTSUKI \\--
  2.  
  3. if not _G.Executed then
  4.  
  5. _G.Executed = true
  6.  
  7. function Tween(obj,props,time,easing,direction,repeats,backwards)
  8. local info = TweenInfo.new(time or .5, easing or Enum.EasingStyle.Quad, direction or Enum.EasingDirection.Out, repeats or 0, backwards or false)
  9. local tween = game:GetService("TweenService"):Create(obj, info, props)
  10. tween:Play()
  11. end
  12.  
  13. local Services = {
  14. Debris = game:GetService("Debris"),
  15. RenderStepped = game:GetService("RunService").RenderStepped,
  16. Players = game:GetService("Players")
  17. }
  18.  
  19. local Player = game.Players.LocalPlayer;
  20. local Raining = false;
  21. local Prefix = "`";
  22. local RainFolder = Instance.new("Folder", workspace);
  23.  
  24. local RainCasters = {
  25. [1773860961] = true,
  26. [57370993] = true,
  27. [328330721] = true,
  28. [62009114] = true,
  29. }
  30.  
  31. local CC = Instance.new("ColorCorrectionEffect", game.Lighting)
  32.  
  33. local RainSound = Instance.new("Sound", workspace)
  34. RainSound.SoundId = "rbxassetid://374244545"
  35. RainSound.Volume = 0.001
  36. RainSound.Playing = true
  37. RainSound.Looped = true
  38.  
  39. local StartRC = function(P)
  40. P.Chatted:Connect(function(msg)
  41. if string.lower(msg):find("rain on") then
  42. Raining = true
  43. Tween(RainSound,{Volume = 1},5,Enum.EasingStyle.Linear,Enum.EasingDirection.In)
  44. Tween(CC,{TintColor = Color3.fromRGB(140,140,140), Saturation = -0.2},5,Enum.EasingStyle.Linear,Enum.EasingDirection.In)
  45. --Tween(game.Lighting,{FogColor = Color3.fromRGB(72,72,72), FogEnd = 100, FogStart = 20},5,Enum.EasingStyle.Linear,Enum.EasingDirection.In)
  46. elseif string.lower(msg):find("rain off") then
  47. Raining = false
  48. Tween(RainSound,{Volume = 0.001},5,Enum.EasingStyle.Linear,Enum.EasingDirection.In)
  49. Tween(CC,{TintColor = Color3.fromRGB(255,255,255), Saturation = 0},5,Enum.EasingStyle.Linear,Enum.EasingDirection.In)
  50. --Tween(game.Lighting,{FogColor = Color3.fromRGB(72,72,72), FogEnd = 1000, FogStart = 0},5,Enum.EasingStyle.Linear,Enum.EasingDirection.In)
  51. end
  52. end)
  53. end
  54.  
  55. Services.Players.PlayerAdded:Connect(function(Plr)
  56. if RainCasters[Plr.UserId] then
  57. StartRC(Plr)
  58. end
  59. end)
  60.  
  61. for _,Plr in pairs(Services.Players:GetPlayers()) do
  62. if RainCasters[Plr.UserId] then
  63. StartRC(Plr)
  64. end
  65. end
  66.  
  67. Services.RenderStepped:Connect(function()
  68. if Raining and Player.Character then
  69. local Ray = Ray.new(Player.Character.Torso.Position, Vector3.new(0, 40, 0))
  70. local Part,d = game.Workspace:FindPartOnRayWithIgnoreList(Ray, {Player.Character}, false, false)
  71. if Part and Part.CanCollide == true and Part.Transparency == 0 then
  72. Tween(RainSound,{Volume = 0.2},0.5,Enum.EasingStyle.Linear,Enum.EasingDirection.In)
  73. else
  74. Tween(RainSound,{Volume = 1},0.5,Enum.EasingStyle.Linear,Enum.EasingDirection.In)
  75. end
  76. end
  77. if Raining == true and Player.Character then
  78. local Rain = Instance.new("Part", RainFolder)
  79. Services.Debris:AddItem(Rain, 20)
  80. local RainMesh = Instance.new("SpecialMesh", Rain)
  81. RainMesh.MeshType = "Sphere"
  82. Rain.Material = Enum.Material.Glass
  83. Rain.Transparency = 0.7
  84. Rain.Color = Color3.fromRGB(82, 124, 174)
  85. Rain.Anchored = true
  86. Rain.Size = Vector3.new(math.random(10, 20)/100,math.random(400,500)/100,math.random(10, 20)/100)
  87. Rain.Position = Player.Character.Torso.Position + Vector3.new(math.random(-100, 100), math.random(60, 100), math.random(-100, 100))
  88. local Ray = Ray.new(Rain.Position, Vector3.new(0, -200, 0))
  89. local Part,d = game.Workspace:FindPartOnRayWithIgnoreList(Ray, {Player.Character}, false, false)
  90. if Part and Part.CanCollide == true and Part.Transparency == 0 then
  91. Tween(Rain,{Position = d},1,Enum.EasingStyle.Linear,Enum.EasingDirection.In)
  92. wait(1)
  93. local Position = Rain.Position
  94. Rain:Destroy()
  95. local Cylinder = Instance.new("Part", workspace)
  96. Cylinder.Material = Enum.Material.Glass
  97. Cylinder.Transparency = 0.7
  98. Cylinder.Color = Color3.fromRGB(82, 124, 174)
  99. Cylinder.Shape = "Cylinder"
  100. Cylinder.Anchored = true
  101. Cylinder.Position = d + Vector3.new(0, 0.25, 0)
  102. Cylinder.Size = Vector3.new(0.3,1,1)
  103. Cylinder.Orientation = Vector3.new(0, 0, 90)
  104. Tween(Cylinder,{Transparency = 1, Size = Vector3.new(0.1,5,5), Position = Cylinder.Position + Vector3.new(0, -0.2, 0)},1,Enum.EasingStyle.Quint,Enum.EasingDirection.Out)
  105. Services.Debris:AddItem(Cylinder, 1)
  106. end
  107. end
  108. end)
  109.  
  110. end
Advertisement
Add Comment
Please, Sign In to add comment