Advertisement
plytalent

cloud vis fe loudness

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