Advertisement
zephpsian

Untitled

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