Advertisement
GodOfDuckz

bad cloud edit

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