Advertisement
Guest User

Untitled

a guest
Mar 28th, 2020
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.59 KB | None | 0 0
  1. -- CONVERTED BY MURLOC04 / GOGO0518
  2. -- dont leak my edits !!
  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("!play (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("!snow / !rain [Changes Weather]")
  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.Offset = Vector3.new(0,1,0)
  199.  
  200.  
  201. local loudness = 0
  202.  
  203.  
  204.  
  205. local S = Instance.new('Sound',Cloud)
  206.  
  207. S.SoundId = "rbxassetid://170020261"
  208.  
  209. S.Looped = true
  210.  
  211. S.Volume = 10
  212.  
  213. S.PlaybackSpeed = 1
  214.  
  215. S.MaxDistance = 100000
  216.  
  217. S:Play()
  218.  
  219.  
  220. local Volume = 5
  221.  
  222.  
  223.  
  224. local Rain = Instance.new('ParticleEmitter',Cloud)
  225.  
  226. Rain.Color = ColorSequence.new(Color3.new(1,1,1),Color3.fromRGB(175,255,255))
  227.  
  228. Rain.Size = NumberSequence.new(.5)
  229.  
  230. Rain.Texture = "http://www.roblox.com/asset/?id=241876428"
  231.  
  232. Rain.Transparency = NumberSequence.new(0,.6)
  233.  
  234. Rain.Acceleration = Vector3.new(0,-150,0)
  235.  
  236. Rain.Lifetime = NumberRange.new(5,10)
  237.  
  238. Rain.Rate = 100
  239.  
  240.  
  241.  
  242. local Shade = Instance.new('PointLight',Cloud)
  243.  
  244. Shade.Range = 10
  245.  
  246. Shade.Color = Color3.fromRGB(50,50,50)
  247.  
  248. Shade.Enabled = true
  249.  
  250. Shade.Shadows = true
  251.  
  252.  
  253.  
  254. local rad = math.rad
  255.  
  256. local sin = math.sin
  257.  
  258. local tan = math.tan
  259.  
  260. local cos = math.cos
  261.  
  262. Player.Chatted:connect(function(m)
  263.  
  264. if m:match("!play%s%d+") then
  265.  
  266. S:Stop()
  267.  
  268. S.SoundId = "rbxassetid://"..m:match("!play%s(%d+)")
  269.  
  270. S:Play()
  271.  
  272. elseif m:match("!volume%s%d+") then
  273.  
  274. S.Volume = m:match("!volume%s(%d+)")
  275.  
  276. Volume = m:match("!volume%s(%d+)")
  277.  
  278. elseif m:match("!pitch%s%d+") then
  279.  
  280. S.PlaybackSpeed = m:match("!pitch%s(%d+)")/10
  281.  
  282. elseif m:match("!snow") then
  283.  
  284. Rain.Texture = "http://www.roblox.com/asset/?id=605668174"
  285.  
  286. Rain.Acceleration = Vector3.new(0,-10,0)
  287.  
  288. Rain.Lifetime = NumberRange.new(15,20)
  289.  
  290. Rain.Size = NumberSequence.new(.2)
  291.  
  292. elseif m:match("!rain") then
  293.  
  294. Rain.Texture = "http://www.roblox.com/asset/?id=241876428"
  295.  
  296. Rain.Acceleration = Vector3.new(0,-150,0)
  297.  
  298. Rain.Lifetime = NumberRange.new(5,10)
  299.  
  300. Rain.Size = NumberSequence.new(.5)
  301.  
  302. elseif m:match("!rate%s%d+") then
  303.  
  304. multiplier = m:match("!rate%s(%d+)")
  305.  
  306. elseif m:match("!rr") then
  307.  
  308. print(Rain.Rate)
  309.  
  310. elseif m:match("!pbs") then
  311.  
  312. print(S.PlaybackSpeed)
  313.  
  314. elseif m:match("!rot") then
  315.  
  316. print(Cloud.Rotation)
  317.  
  318. end
  319. end)
  320.  
  321.  
  322.  
  323. function Weld(x,y)
  324.  
  325. local w = Instance.new("Weld")
  326.  
  327. w.Part0 = x
  328.  
  329. w.Part1 = y
  330.  
  331. w.Name = tostring(y.Name).."_Weld"
  332.  
  333. w.Parent = x
  334.  
  335. return w
  336.  
  337. end
  338.  
  339.  
  340.  
  341. function Clerp(start,destination,increment)
  342.  
  343. local function slerp(a,b,c)return (1-c)*a+(c*b)end
  344.  
  345. local c1 = {start.X,start.Y,start.Z,start:toEulerAnglesXYZ()}
  346.  
  347. local c2 = {destination.X,destination.Y,destination.Z,destination:toEulerAnglesXYZ()}
  348.  
  349. for i,v in pairs(c1)do c1[i] = slerp(v,c2[i],increment)end
  350.  
  351. return CFrame.new(c1[1],c1[2],c1[3])*CFrame.Angles(c1[4],c1[5],c1[6])
  352.  
  353. end
  354.  
  355.  
  356.  
  357. DrawLightning = function(Start,End,Times,Offset,Color,Thickness)
  358.  
  359. if Start.y>End.y then
  360.  
  361. local magz = (Start - End).magnitude
  362.  
  363. local curpos = Start
  364.  
  365. local trz = {-Offset,Offset}
  366.  
  367. for i=1,Times do
  368.  
  369. local li = Instance.new("Part",workspace)
  370.  
  371. li.TopSurface =10
  372.  
  373. li.BottomSurface = 10
  374.  
  375. li.Anchored = true
  376.  
  377. li.Transparency = 0
  378.  
  379. li.BrickColor = Color
  380.  
  381. li.formFactor = "Custom"
  382.  
  383. li.CanCollide = false
  384.  
  385. li.Size = Vector3.new(Thickness,Thickness,magz/Times)
  386.  
  387. local lt=Instance.new("SpotLight",li)
  388.  
  389. lt.Range=16
  390.  
  391. lt.Brightness=5
  392.  
  393. lt.Shadows=true
  394.  
  395. lt.Angle=45
  396.  
  397. lt.Face="Top"
  398.  
  399. lt.Color=li.BrickColor.Color
  400.  
  401. local ofz = Vector3.new(trz[math.random(1,2)],trz[math.random(1,2)],trz[math.random(1,2)])
  402.  
  403. local trolpos = CFrame.new(curpos,End)*CFrame.new(0,0,magz/Times).p+ofz
  404.  
  405. if Times == i then
  406.  
  407. local magz2 = (curpos - End).magnitude
  408.  
  409. li.Size = Vector3.new(Thickness,Thickness,magz2)
  410.  
  411. li.CFrame = CFrame.new(curpos,End)*CFrame.new(0,0,-magz2/2)
  412.  
  413. else
  414.  
  415. li.CFrame = CFrame.new(curpos,trolpos)*CFrame.new(0,0,magz/Times/2)
  416.  
  417. end
  418.  
  419. 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)
  420.  
  421. end
  422.  
  423. 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
  424.  
  425. 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
  426.  
  427. end
  428.  
  429. end
  430.  
  431.  
  432.  
  433. maus.Button1Down:connect(function()
  434.  
  435. if ltdb==false then
  436.  
  437. ltdb=true
  438.  
  439. DrawLightning(Cloud.CFrame.p,maus.Hit.p,5,.5,BrickColor.new("New Yeller"),.2)
  440.  
  441. wait()
  442.  
  443. ltdb=false
  444.  
  445. end
  446.  
  447. end)
  448.  
  449. local Spinny = 0
  450.  
  451. local NoU = 0
  452.  
  453. while true do
  454.  
  455. Rain.Rate = (S.PlaybackLoudness + 1) * multiplier/5
  456.  
  457. game:GetService('RunService').RenderStepped:wait()
  458.  
  459. local HP = H.CFrame.p
  460.  
  461. local sizer = S.PlaybackLoudness/55 + 5
  462.  
  463. Cloud.Size = Vector3.new(sizer,1,sizer)
  464.  
  465. Shade.Range = sizer
  466.  
  467. CloudMesh.Scale = Vector3.new(sizer,5,sizer)
  468.  
  469. Cloud.CFrame = Clerp(Cloud.CFrame, CFrame.new(HP + Vector3.new(0,4,0))*CFrame.Angles(0,rad(90),0), .1)
  470.  
  471. Cloud.BrickColor = BrickColor.new(Color3.fromRGB(255 - S.PlaybackLoudness/2, 255-S.PlaybackLoudness/2, 255-S.PlaybackLoudness/2))
  472. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement