ZaGodlyNoob

Cloud Visualizer

Jun 4th, 2019
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --//Cloud Visualizer
  2.  
  3. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  4. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  5. local RealPlayer = Player
  6. do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end,__call=function(self,...)local t=rawget(self,"_RealService")if t then return t(...)end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return self[t]end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;x.RunService=v({RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")setmetatable(x,{__index=function(self,t)return r:GetService(t)or typeof(r[t])=="function"and function(m,...)return r[t](r,...)end or r[t]end,__newindex=s.__newindex,__call=s.__call})game,owner=x,x.Players.LocalPlayer end
  7.  
  8. --//Cloud Script
  9.  
  10. print("AxilYT, Commands are !play !snow !rain !multiplier and !volume")local Player = owner
  11.  
  12. local Character = Player.Character
  13.  
  14. local H = Character["Head"]
  15.  
  16. local multiplier = 4
  17.  
  18. local Cloud = Instance.new('Part',Character)
  19.  
  20. Cloud.Size = Vector3.new(20,15,20)
  21.  
  22. Cloud.Anchored = true
  23.  
  24. Cloud.CanCollide = false
  25.  
  26. Cloud.Transparency = 0
  27.  
  28.  
  29.  
  30. local CloudMesh = Instance.new('SpecialMesh',Cloud)
  31.  
  32. CloudMesh.Scale = Vector3.new(25,10,25)
  33.  
  34. CloudMesh.MeshId = "http://www.roblox.com/asset/?id=1095708"
  35.  
  36. CloudMesh.Offset = Vector3.new(0,10,0)
  37.  
  38.  
  39. local loudness = 0
  40.  
  41.  
  42.  
  43. local S = Instance.new('Sound',Cloud)
  44.  
  45. S.SoundId = "rbxassetid://1117396305"
  46.  
  47. S.Looped = true
  48.  
  49. S.Volume = 8
  50.  
  51. S.MaxDistance = 100
  52.  
  53. S:Play()
  54.  
  55.  
  56.  
  57. local Rain = Instance.new('ParticleEmitter',Cloud)
  58.  
  59. Rain.Color = ColorSequence.new(Color3.new(1,1,1),Color3.fromRGB(175,255,255))
  60.  
  61. Rain.Size = NumberSequence.new(.5)
  62.  
  63. Rain.Texture = "http://www.roblox.com/asset/?id=241876428"
  64.  
  65. Rain.Transparency = NumberSequence.new(0,.6)
  66.  
  67. Rain.Acceleration = Vector3.new(0,-150,0)
  68.  
  69. Rain.Lifetime = NumberRange.new(5,10)
  70.  
  71. Rain.Rate = 100
  72.  
  73. local rad = math.rad
  74.  
  75. local sin = math.sin
  76.  
  77. local tan = math.tan
  78.  
  79. local cos = math.cos
  80.  
  81. Player.Chatted:connect(function(m)
  82.  
  83. if m:match("!play%s%d+") then
  84.  
  85. S:Stop()
  86.  
  87. S.SoundId = "rbxassetid://"..m:match("!play%s(%d+)")
  88.  
  89. S:Play()
  90.  
  91. elseif m:match("!volume%s%d+") then
  92.  
  93. S.Volume = m:match("!volume%s(%d+)")
  94.  
  95. elseif m:match("!pitch%s%d+") then
  96.  
  97. S.Pitch = m:match("!volume%s(%d+)")
  98.  
  99. elseif m:match("!snow") then
  100.  
  101. Rain.Texture = "http://www.roblox.com/asset/?id=605668174"
  102.  
  103. Rain.Acceleration = Vector3.new(0,-10,0)
  104.  
  105. Rain.Lifetime = NumberRange.new(15,20)
  106.  
  107. Rain.Size = NumberSequence.new(.2)
  108.  
  109. elseif m:match("!rain") then
  110.  
  111. Rain.Texture = "http://www.roblox.com/asset/?id=241876428"
  112.  
  113. Rain.Acceleration = Vector3.new(0,-150,0)
  114.  
  115. Rain.Lifetime = NumberRange.new(5,10)
  116.  
  117. Rain.Size = NumberSequence.new(.5)
  118.  
  119. elseif m:match("!multiplier%s%d+") then
  120.  
  121. multiplier = m:match("!multiplier%s(%d+)")
  122.  
  123. elseif m:match("!rr") then
  124.  
  125. print(Rain.Rate)
  126.  
  127. end
  128. end)
  129.  
  130.  
  131.  
  132. function Weld(x,y)
  133.  
  134. local w = Instance.new("Weld")
  135.  
  136. w.Part0 = x
  137.  
  138. w.Part1 = y
  139.  
  140. w.Name = tostring(y.Name).."_Weld"
  141.  
  142. w.Parent = x
  143.  
  144. return w
  145.  
  146. end
  147.  
  148.  
  149.  
  150. function Clerp(start,destination,increment)
  151.  
  152. local function slerp(a,b,c)return (1-c)*a+(c*b)end
  153.  
  154. local c1 = {start.X,start.Y,start.Z,start:toEulerAnglesXYZ()}
  155.  
  156. local c2 = {destination.X,destination.Y,destination.Z,destination:toEulerAnglesXYZ()}
  157.  
  158. for i,v in pairs(c1)do c1[i] = slerp(v,c2[i],increment)end
  159.  
  160. return CFrame.new(c1[1],c1[2],c1[3])*CFrame.Angles(c1[4],c1[5],c1[6])
  161.  
  162. end
  163.  
  164.  
  165.  
  166. while true do
  167.  
  168. Rain.Rate = (S.PlaybackLoudness + 50) * multiplier
  169.  
  170. game:GetService('RunService').RenderStepped:wait()
  171.  
  172. local HP = H.CFrame.p
  173.  
  174. local sizer = S.PlaybackLoudness/50 + 15
  175.  
  176. Cloud.Size = Vector3.new(sizer,15,sizer)
  177.  
  178. CloudMesh.Scale = Vector3.new(sizer,10,sizer)
  179.  
  180. Cloud.CFrame = Clerp(Cloud.CFrame, CFrame.new(HP + Vector3.new(0,4,0))*CFrame.Angles(0,rad(90),0), .1)
  181.  
  182. Cloud.BrickColor = BrickColor.new(Color3.fromRGB(255 - S.PlaybackLoudness*1.1, 255-S.PlaybackLoudness*1.1, 255-S.PlaybackLoudness*1.1))
  183. end
Add Comment
Please, Sign In to add comment