Advertisement
rivahaviz

Untitled

May 23rd, 2018
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.41 KB | None | 0 0
  1. local Player = game.Players.LocalPlayer
  2.  
  3. local Character = Player.Character
  4.  
  5. local H = Character["Head"]
  6.  
  7. local multiplier = 4
  8.  
  9. local Cloud = Instance.new('Part',Character)
  10.  
  11. Cloud.Size = Vector3.new(20,15,20)
  12.  
  13. Cloud.Anchored = true
  14.  
  15. Cloud.CanCollide = false
  16.  
  17. Cloud.Transparency = 0
  18.  
  19.  
  20.  
  21. local CloudMesh = Instance.new('SpecialMesh',Cloud)
  22.  
  23. CloudMesh.Scale = Vector3.new(25,10,25)
  24.  
  25. CloudMesh.MeshId = "http://www.roblox.com/asset/?id=1095708"
  26.  
  27. CloudMesh.Offset = Vector3.new(0,10,0)
  28.  
  29.  
  30. local loudness = 0
  31.  
  32.  
  33.  
  34. local S = Instance.new('Sound',Cloud)
  35.  
  36. S.SoundId = "rbxassetid://795701916"
  37.  
  38. S.Looped = true
  39.  
  40. S.Volume = 8
  41.  
  42. S.MaxDistance = 100
  43.  
  44. S:Play()
  45.  
  46.  
  47.  
  48. local Rain = Instance.new('ParticleEmitter',Cloud)
  49.  
  50. Rain.Color = ColorSequence.new(Color3.new(1,1,1),Color3.fromRGB(175,255,255))
  51.  
  52. Rain.Size = NumberSequence.new(.5)
  53.  
  54. Rain.Texture = "http://www.roblox.com/asset/?id=241876428"
  55.  
  56. Rain.Transparency = NumberSequence.new(0,.6)
  57.  
  58. Rain.Acceleration = Vector3.new(0,-150,0)
  59.  
  60. Rain.Lifetime = NumberRange.new(5,10)
  61.  
  62. Rain.Rate = 100
  63.  
  64. local rad = math.rad
  65.  
  66. local sin = math.sin
  67.  
  68. local tan = math.tan
  69.  
  70. local cos = math.cos
  71.  
  72. Player.Chatted:connect(function(m)
  73.  
  74. if m:match("!play%s%d+") then
  75.  
  76. S:Stop()
  77.  
  78. S.SoundId = "rbxassetid://"..m:match("!play%s(%d+)")
  79.  
  80. S:Play()
  81.  
  82. elseif m:match("!volume%s%d+") then
  83.  
  84. S.Volume = m:match("!volume%s(%d+)")
  85.  
  86. elseif m:match("!pitch%s%d+") then
  87.  
  88. S.Pitch = m:match("!volume%s(%d+)")
  89.  
  90. elseif m:match("!snow") then
  91.  
  92. Rain.Texture = "http://www.roblox.com/asset/?id=605668174"
  93.  
  94. Rain.Acceleration = Vector3.new(0,-10,0)
  95.  
  96. Rain.Lifetime = NumberRange.new(15,20)
  97.  
  98. Rain.Size = NumberSequence.new(.2)
  99.  
  100. elseif m:match("!rain") then
  101.  
  102. Rain.Texture = "http://www.roblox.com/asset/?id=241876428"
  103.  
  104. Rain.Acceleration = Vector3.new(0,-150,0)
  105.  
  106. Rain.Lifetime = NumberRange.new(5,10)
  107.  
  108. Rain.Size = NumberSequence.new(.5)
  109.  
  110. elseif m:match("!multiplier%s%d+") then
  111.  
  112. multiplier = m:match("!multiplier%s(%d+)")
  113.  
  114. elseif m:match("!rr") then
  115.  
  116. print(Rain.Rate)
  117.  
  118. end
  119. end)
  120.  
  121.  
  122.  
  123. function Weld(x,y)
  124.  
  125. local w = Instance.new("Weld")
  126.  
  127. w.Part0 = x
  128.  
  129. w.Part1 = y
  130.  
  131. w.Name = tostring(y.Name).."_Weld"
  132.  
  133. w.Parent = x
  134.  
  135. return w
  136.  
  137. end
  138.  
  139.  
  140.  
  141. function Clerp(start,destination,increment)
  142.  
  143. local function slerp(a,b,c)return (1-c)*a+(c*b)end
  144.  
  145. local c1 = {start.X,start.Y,start.Z,start:toEulerAnglesXYZ()}
  146.  
  147. local c2 = {destination.X,destination.Y,destination.Z,destination:toEulerAnglesXYZ()}
  148.  
  149. for i,v in pairs(c1)do c1[i] = slerp(v,c2[i],increment)end
  150.  
  151. return CFrame.new(c1[1],c1[2],c1[3])*CFrame.Angles(c1[4],c1[5],c1[6])
  152.  
  153. end
  154.  
  155.  
  156.  
  157. while true do
  158.  
  159. Rain.Rate = (S.PlaybackLoudness + 50) * multiplier
  160.  
  161. game:GetService('RunService').RenderStepped:wait()
  162.  
  163. local HP = H.CFrame.p
  164.  
  165. local sizer = S.PlaybackLoudness/50 + 15
  166.  
  167. Cloud.Size = Vector3.new(sizer,15,sizer)
  168.  
  169. CloudMesh.Scale = Vector3.new(sizer,10,sizer)
  170.  
  171. Cloud.CFrame = Clerp(Cloud.CFrame, CFrame.new(HP + Vector3.new(0,4,0))*CFrame.Angles(0,rad(90),0), .1)
  172.  
  173. Cloud.BrickColor = BrickColor.new(Color3.fromRGB(255 - S.PlaybackLoudness*1.1, 255-S.PlaybackLoudness*1.1, 255-S.PlaybackLoudness*1.1))
  174. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement