Advertisement
RBLPlayer

Cloud Visualizer V2 [FE]

Nov 19th, 2019
511
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. local Player,game,owner = owner,game
  3. local RealPlayer = Player
  4. do
  5. local rp = RealPlayer
  6. script.Parent = rp.Character
  7.  
  8. --RemoteEvent for communicating
  9. local Event = Instance.new("RemoteEvent")
  10. Event.Name = "UserInput_Event"
  11.  
  12. --Fake event to make stuff like Mouse.KeyDown work
  13. local function fakeEvent()
  14. local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  15. t.connect = t.Connect
  16. return t
  17. end
  18.  
  19. --Creating fake input objects with fake variables
  20. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  21. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  22. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  23. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  24. end}
  25. --Merged 2 functions into one by checking amount of arguments
  26. CAS.UnbindAction = CAS.BindAction
  27.  
  28. --This function will trigger the events that have been :Connect()'ed
  29. local function te(self,ev,...)
  30. local t = m[ev]
  31. if t and t._fakeEvent then
  32. for _,f in pairs(t.Functions) do
  33. f(...)
  34. end
  35. end
  36. end
  37. m.TrigEvent = te
  38. UIS.TrigEvent = te
  39.  
  40. Event.OnServerEvent:Connect(function(plr,io)
  41. if plr~=rp then return end
  42. m.Target = io.Target
  43. m.Hit = io.Hit
  44. if not io.isMouse then
  45. local b = io.UserInputState == Enum.UserInputState.Begin
  46. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  47. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  48. end
  49. for _,t in pairs(CAS.Actions) do
  50. for _,k in pairs(t.Keys) do
  51. if k==io.KeyCode then
  52. t.Function(t.Name,io.UserInputState,io)
  53. end
  54. end
  55. end
  56. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  57. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  58. end
  59. end)
  60. Event.Parent = NLS([==[
  61. local Player = game:GetService("Players").LocalPlayer
  62. local Event = script:WaitForChild("UserInput_Event")
  63.  
  64. local Mouse = Player:GetMouse()
  65. local UIS = game:GetService("UserInputService")
  66. local input = function(io,a)
  67. if a then return end
  68. --Since InputObject is a client-side instance, we create and pass table instead
  69. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  70. end
  71. UIS.InputBegan:Connect(input)
  72. UIS.InputEnded:Connect(input)
  73.  
  74. local h,t
  75. --Give the server mouse data 30 times every second, but only if the values changed
  76. --If player is not moving their mouse, client won't fire events
  77. while wait(1/30) do
  78. if h~=Mouse.Hit or t~=Mouse.Target then
  79. h,t=Mouse.Hit,Mouse.Target
  80. Event:FireServer({isMouse=true,Target=t,Hit=h})
  81. end
  82. end]==],Player.Character)
  83.  
  84. ----Sandboxed game object that allows the usage of client-side methods and services
  85. --Real game object
  86. local _rg = game
  87.  
  88. --Metatable for fake service
  89. local fsmt = {
  90. __index = function(self,k)
  91. local s = rawget(self,"_RealService")
  92. if s then return s[k] end
  93. end,
  94. __newindex = function(self,k,v)
  95. local s = rawget(self,"_RealService")
  96. if s then s[k]=v end
  97. end,
  98. __call = function(self,...)
  99. local s = rawget(self,"_RealService")
  100. if s then return s(...) end
  101. end
  102. }
  103. local function FakeService(t,RealService)
  104. t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  105. return setmetatable(t,fsmt)
  106. end
  107.  
  108. --Fake game object
  109. local g = {
  110. GetService = function(self,s)
  111. return self[s]
  112. end,
  113. Players = FakeService({
  114. LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  115. },"Players"),
  116. UserInputService = FakeService(UIS,"UserInputService"),
  117. ContextActionService = FakeService(CAS,"ContextActionService"),
  118. }
  119. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  120. g.service = g.GetService
  121.  
  122. g.RunService = FakeService({
  123. RenderStepped = _rg:GetService("RunService").Heartbeat,
  124. BindToRenderStep = function(self,name,_,fun)
  125. self._btrs[name] = self.Heartbeat:Connect(fun)
  126. end,
  127. UnbindFromRenderStep = function(self,name)
  128. self._btrs[name]:Disconnect()
  129. end,
  130. },"RunService")
  131.  
  132. setmetatable(g,{
  133. __index=function(self,s)
  134. return _rg:GetService(s) or typeof(_rg[s])=="function"
  135. and function(_,...)return _rg[s](_rg,...)end or _rg[s]
  136. end,
  137. __newindex = fsmt.__newindex,
  138. __call = fsmt.__call
  139. })
  140. --Changing owner to fake player object to support owner:GetMouse()
  141. game,owner = g,g.Players.LocalPlayer
  142. end
  143. -- Made by Zuu_Roku w/ Help from Cass!
  144. -- Venge is ok happy? But nebby is better /e dab
  145.  
  146. print("Made by Zuu_Roku, Thanks Cass for Cloud CLerp.")
  147.  
  148. print("Rain Cloud Visualizer (Update 1.2 I guess) Commands:")
  149.  
  150. print("!play (ID) [Changes song]")
  151.  
  152. print("!pitch (#) [normal pitch is '10'][THIS IS FIXED AAAAAAAAAAAAAAAAAA, Sound.Pitch was Depreciated and never knew, hence why it never worked]")
  153.  
  154. print("!snow / !rain [Changes Weather]")
  155.  
  156. print("!rate (#) [Changes amount of particles]")
  157.  
  158. print("Click for a Lightning bolt!")
  159.  
  160.  
  161.  
  162. local Player = game.Players.LocalPlayer
  163.  
  164. local Character = Player.Character
  165.  
  166. local maus = Player:GetMouse()
  167.  
  168. local H = Character["Head"]
  169.  
  170. local multiplier = 4
  171.  
  172. local ltdb = false
  173.  
  174. local Cloud = Instance.new('Part',Character)
  175.  
  176. Cloud.Size = Vector3.new(1,1,1)
  177.  
  178. Cloud.Anchored = true
  179.  
  180. Cloud.CanCollide = false
  181.  
  182. Cloud.Transparency = 0
  183.  
  184.  
  185.  
  186. local CloudMesh = Instance.new('SpecialMesh',Cloud)
  187.  
  188. CloudMesh.Scale = Vector3.new(4,4,4)
  189.  
  190. CloudMesh.MeshId = "http://www.roblox.com/asset/?id=151760030"
  191.  
  192. Cloud.TextureId = "http://www.roblox.com/asset/?id=151760072"
  193.  
  194. CloudMesh.Offset = Vector3.new(0,0,0)
  195.  
  196.  
  197. local loudness = 0
  198.  
  199.  
  200.  
  201. local S = Instance.new('Sound',Cloud)
  202.  
  203. S.SoundId = "rbxassetid://170020261"
  204.  
  205. S.Looped = true
  206.  
  207. S.Volume = 8
  208.  
  209. S.PlaybackSpeed = 1
  210.  
  211. S.MaxDistance = 200
  212.  
  213. S:Play()
  214.  
  215.  
  216. local Volume = 5
  217.  
  218.  
  219. local Shade = Instance.new('PointLight',Cloud)
  220.  
  221. Shade.Range = 10
  222.  
  223. Shade.Color = Color3.fromRGB(50,50,50)
  224.  
  225. Shade.Enabled = true
  226.  
  227. Shade.Shadows = true
  228.  
  229.  
  230.  
  231. local rad = math.rad
  232.  
  233. local sin = math.sin
  234.  
  235. local tan = math.tan
  236.  
  237. local cos = math.cos
  238.  
  239. Player.Chatted:connect(function(m)
  240.  
  241. if m:match("!play%s%d+") then
  242.  
  243. S:Stop()
  244.  
  245. S.SoundId = "rbxassetid://"..m:match("!play%s(%d+)")
  246.  
  247. S:Play()
  248.  
  249. elseif m:match("!volume%s%d+") then
  250.  
  251. S.Volume = m:match("!volume%s(%d+)")
  252.  
  253. Volume = m:match("!volume%s(%d+)")
  254.  
  255. elseif m:match("!pitch%s%d+") then
  256.  
  257. S.PlaybackSpeed = m:match("!pitch%s(%d+)")/10
  258.  
  259. elseif m:match("!snow") then
  260.  
  261. Rain.Texture = ""
  262.  
  263. Rain.Acceleration = Vector3.new(0,-10,0)
  264.  
  265. Rain.Lifetime = NumberRange.new(15,20)
  266.  
  267. Rain.Size = NumberSequence.new(.2)
  268.  
  269. elseif m:match("!rain") then
  270.  
  271. Rain.Texture = ""
  272.  
  273. Rain.Acceleration = Vector3.new(0,-150,0)
  274.  
  275. Rain.Lifetime = NumberRange.new(5,10)
  276.  
  277. Rain.Size = NumberSequence.new(.5)
  278.  
  279. elseif m:match("!rate%s%d+") then
  280.  
  281. multiplier = m:match("!rate%s(%d+)")
  282.  
  283. elseif m:match("!rr") then
  284.  
  285. print(Rain.Rate)
  286.  
  287. elseif m:match("!pbs") then
  288.  
  289. print(S.PlaybackSpeed)
  290.  
  291. elseif m:match("!rot") then
  292.  
  293. print(Cloud.Rotation)
  294.  
  295. end
  296. end)
  297.  
  298.  
  299.  
  300. function Weld(x,y)
  301.  
  302. local w = Instance.new("Weld")
  303.  
  304. w.Part0 = x
  305.  
  306. w.Part1 = y
  307.  
  308. w.Name = tostring(y.Name).."_Weld"
  309.  
  310. w.Parent = x
  311.  
  312. return w
  313.  
  314. end
  315.  
  316.  
  317.  
  318. function Clerp(start,destination,increment)
  319.  
  320. local function slerp(a,b,c)return (1-c)*a+(c*b)end
  321.  
  322. local c1 = {start.X,start.Y,start.Z,start:toEulerAnglesXYZ()}
  323.  
  324. local c2 = {destination.X,destination.Y,destination.Z,destination:toEulerAnglesXYZ()}
  325.  
  326. for i,v in pairs(c1)do c1[i] = slerp(v,c2[i],increment)end
  327.  
  328. return CFrame.new(c1[1],c1[2],c1[3])*CFrame.Angles(c1[4],c1[5],c1[6])
  329.  
  330. end
  331.  
  332.  
  333.  
  334. DrawLightning = function(Start,End,Times,Offset,Color,Thickness)
  335.  
  336. if Start.y>End.y then
  337.  
  338. local magz = (Start - End).magnitude
  339.  
  340. local curpos = Start
  341.  
  342. local trz = {-Offset,Offset}
  343.  
  344. for i=1,Times do
  345.  
  346. local li = Instance.new("Part",workspace)
  347.  
  348. li.TopSurface =10
  349.  
  350. li.BottomSurface = 10
  351.  
  352. li.Anchored = true
  353.  
  354. li.Transparency = 0
  355.  
  356. li.BrickColor = Color
  357.  
  358. li.formFactor = "Custom"
  359.  
  360. li.CanCollide = false
  361.  
  362. li.Size = Vector3.new(Thickness,Thickness,magz/Times)
  363.  
  364. local lt=Instance.new("SpotLight",li)
  365.  
  366. lt.Range=16
  367.  
  368. lt.Brightness=5
  369.  
  370. lt.Shadows=true
  371.  
  372. lt.Angle=45
  373.  
  374. lt.Face="Top"
  375.  
  376. lt.Color=li.BrickColor.Color
  377.  
  378. local ofz = Vector3.new(trz[math.random(1,2)],trz[math.random(1,2)],trz[math.random(1,2)])
  379.  
  380. local trolpos = CFrame.new(curpos,End)*CFrame.new(0,0,magz/Times).p+ofz
  381.  
  382. if Times == i then
  383.  
  384. local magz2 = (curpos - End).magnitude
  385.  
  386. li.Size = Vector3.new(Thickness,Thickness,magz2)
  387.  
  388. li.CFrame = CFrame.new(curpos,End)*CFrame.new(0,0,-magz2/2)
  389.  
  390. else
  391.  
  392. li.CFrame = CFrame.new(curpos,trolpos)*CFrame.new(0,0,magz/Times/2)
  393.  
  394. end
  395.  
  396. curpos = li.CFrame*CFrame.new(0,0,magz/Times/2).p Spawn(function() for i=1,5 do wait() li.Transparency = li.Transparency+.2 end li:Destroy() end)
  397.  
  398. end
  399.  
  400. for i,x in pairs(workspace:GetChildren()) do if x:IsA'Model' and x:findFirstChild('Head') and x~=Character and x.Name~="Zuu_Roku" then
  401.  
  402. for a,v in pairs(x:GetChildren()) do if v:IsA'Humanoid' then if (x.Head.CFrame.p-End).magnitude<10 then x:BreakJoints() end end end end end
  403.  
  404. end
  405.  
  406. end
  407.  
  408.  
  409.  
  410. maus.Button1Down:connect(function()
  411.  
  412. if ltdb==false then
  413.  
  414. ltdb=true
  415.  
  416. DrawLightning(Cloud.CFrame.p,maus.Hit.p,5,.5,BrickColor.new("New Yeller"),.2)
  417.  
  418. wait()
  419.  
  420. ltdb=false
  421.  
  422. end
  423.  
  424. end)
  425.  
  426. local Spinny = 0
  427.  
  428. local NoU = 0
  429.  
  430. while true do
  431.  
  432. Rain.Rate = (S.PlaybackLoudness + 1) * multiplier/5
  433.  
  434. game:GetService('RunService').RenderStepped:wait()
  435.  
  436. local HP = H.CFrame.p
  437.  
  438. local sizer = S.PlaybackLoudness/55 + 5
  439.  
  440. Cloud.Size = Vector3.new(sizer,1,sizer)
  441.  
  442. Shade.Range = sizer
  443.  
  444. CloudMesh.Scale = Vector3.new(sizer,5,sizer)
  445.  
  446. Cloud.CFrame = Clerp(Cloud.CFrame, CFrame.new(HP + Vector3.new(0,4,0))*CFrame.Angles(0,rad(90),0), .1)
  447.  
  448. Cloud.BrickColor = BrickColor.new(Color3.fromRGB(255 - S.PlaybackLoudness/2, 255-S.PlaybackLoudness/2, 255-S.PlaybackLoudness/2))
  449. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement