Advertisement
voidman

Untitled

Jan 22nd, 2019
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.98 KB | None | 0 0
  1. --]]
  2. --https://github.com/Mokiros/roblox-FE-compatibility
  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(),Button2Up=c(),Button2Down=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;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")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 typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u 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 rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},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")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end
  7. -- Made by Zuu_Roku w/ Help from Cass!
  8. -- Venge is ok happy? But nebby is better /e dab
  9.  
  10. print("Made by Zuu_Roku, Thanks Cass for Cloud CLerp.")
  11.  
  12. print("Rain Cloud Visualizer (Update 1.2 I guess) Commands:")
  13.  
  14. print("!play (ID) [Changes song]")
  15.  
  16. print("!pitch (#) [normal pitch is '10'][THIS IS FIXED AAAAAAAAAAAAAAAAAA, Sound.Pitch was Depreciated and never knew, hence why it never worked]")
  17.  
  18. print("!snow / !rain [Changes Weather]")
  19.  
  20. print("!rate (#) [Changes amount of particles]")
  21.  
  22. print("Click for a Lightning bolt!")
  23.  
  24.  
  25.  
  26. local Player = game.Players.LocalPlayer
  27.  
  28. local Character = Player.Character
  29.  
  30. local maus = Player:GetMouse()
  31.  
  32. local H = Character["Head"]
  33.  
  34. local multiplier = 4
  35.  
  36. local ltdb = false
  37.  
  38. local Cloud = Instance.new('Part',Character)
  39.  
  40. Cloud.Size = Vector3.new(1,1,1)
  41.  
  42. Cloud.Anchored = true
  43.  
  44. Cloud.CanCollide = false
  45.  
  46. Cloud.Transparency = 0
  47.  
  48.  
  49.  
  50. local CloudMesh = Instance.new('SpecialMesh',Cloud)
  51.  
  52. CloudMesh.Scale = Vector3.new(5,1,5)
  53.  
  54. CloudMesh.MeshId = "http://www.roblox.com/asset/?id=1095708"
  55.  
  56. CloudMesh.Offset = Vector3.new(0,1,0)
  57.  
  58.  
  59. local loudness = 0
  60.  
  61.  
  62.  
  63. local S = Instance.new('Sound',Cloud)
  64.  
  65. S.SoundId = "rbxassetid://170020261"
  66.  
  67. S.Looped = true
  68.  
  69. S.Volume = 8
  70.  
  71. S.PlaybackSpeed = 1
  72.  
  73. S.MaxDistance = 100
  74.  
  75. S:Play()
  76.  
  77.  
  78. local Volume = 5
  79.  
  80.  
  81.  
  82. local Rain = Instance.new('ParticleEmitter',Cloud)
  83.  
  84. Rain.Color = ColorSequence.new(Color3.new(1,1,1),Color3.fromRGB(175,255,255))
  85.  
  86. Rain.Size = NumberSequence.new(.5)
  87.  
  88. Rain.Texture = "http://www.roblox.com/asset/?id=241876428"
  89.  
  90. Rain.Transparency = NumberSequence.new(0,.6)
  91.  
  92. Rain.Acceleration = Vector3.new(0,-150,0)
  93.  
  94. Rain.Lifetime = NumberRange.new(5,10)
  95.  
  96. Rain.Rate = 100
  97.  
  98.  
  99.  
  100. local Shade = Instance.new('PointLight',Cloud)
  101.  
  102. Shade.Range = 10
  103.  
  104. Shade.Color = Color3.fromRGB(50,50,50)
  105.  
  106. Shade.Enabled = true
  107.  
  108. Shade.Shadows = true
  109.  
  110.  
  111.  
  112. local rad = math.rad
  113.  
  114. local sin = math.sin
  115.  
  116. local tan = math.tan
  117.  
  118. local cos = math.cos
  119.  
  120. Player.Chatted:connect(function(m)
  121.  
  122. if m:match("!play%s%d+") then
  123.  
  124. S:Stop()
  125.  
  126. S.SoundId = "rbxassetid://"..m:match("!play%s(%d+)")
  127.  
  128. S:Play()
  129.  
  130. elseif m:match("!volume%s%d+") then
  131.  
  132. S.Volume = m:match("!volume%s(%d+)")
  133.  
  134. Volume = m:match("!volume%s(%d+)")
  135.  
  136. elseif m:match("!pitch%s%d+") then
  137.  
  138. S.PlaybackSpeed = m:match("!pitch%s(%d+)")/10
  139.  
  140. elseif m:match("!snow") then
  141.  
  142. Rain.Texture = "http://www.roblox.com/asset/?id=605668174"
  143.  
  144. Rain.Acceleration = Vector3.new(0,-10,0)
  145.  
  146. Rain.Lifetime = NumberRange.new(15,20)
  147.  
  148. Rain.Size = NumberSequence.new(.2)
  149.  
  150. elseif m:match("!rain") then
  151.  
  152. Rain.Texture = "http://www.roblox.com/asset/?id=241876428"
  153.  
  154. Rain.Acceleration = Vector3.new(0,-150,0)
  155.  
  156. Rain.Lifetime = NumberRange.new(5,10)
  157.  
  158. Rain.Size = NumberSequence.new(.5)
  159.  
  160. elseif m:match("!rate%s%d+") then
  161.  
  162. multiplier = m:match("!rate%s(%d+)")
  163.  
  164. elseif m:match("!rr") then
  165.  
  166. print(Rain.Rate)
  167.  
  168. elseif m:match("!pbs") then
  169.  
  170. print(S.PlaybackSpeed)
  171.  
  172. elseif m:match("!rot") then
  173.  
  174. print(Cloud.Rotation)
  175.  
  176. end
  177. end)
  178.  
  179.  
  180.  
  181. function Weld(x,y)
  182.  
  183. local w = Instance.new("Weld")
  184.  
  185. w.Part0 = x
  186.  
  187. w.Part1 = y
  188.  
  189. w.Name = tostring(y.Name).."_Weld"
  190.  
  191. w.Parent = x
  192.  
  193. return w
  194.  
  195. end
  196.  
  197.  
  198.  
  199. function Clerp(start,destination,increment)
  200.  
  201. local function slerp(a,b,c)return (1-c)*a+(c*b)end
  202.  
  203. local c1 = {start.X,start.Y,start.Z,start:toEulerAnglesXYZ()}
  204.  
  205. local c2 = {destination.X,destination.Y,destination.Z,destination:toEulerAnglesXYZ()}
  206.  
  207. for i,v in pairs(c1)do c1[i] = slerp(v,c2[i],increment)end
  208.  
  209. return CFrame.new(c1[1],c1[2],c1[3])*CFrame.Angles(c1[4],c1[5],c1[6])
  210.  
  211. end
  212.  
  213.  
  214.  
  215. DrawLightning = function(Start,End,Times,Offset,Color,Thickness)
  216.  
  217. if Start.y>End.y then
  218.  
  219. local magz = (Start - End).magnitude
  220.  
  221. local curpos = Start
  222.  
  223. local trz = {-Offset,Offset}
  224.  
  225. for i=1,Times do
  226.  
  227. local li = Instance.new("Part",workspace)
  228.  
  229. li.TopSurface =10
  230.  
  231. li.BottomSurface = 10
  232.  
  233. li.Anchored = true
  234.  
  235. li.Transparency = 0
  236.  
  237. li.BrickColor = Color
  238.  
  239. li.formFactor = "Custom"
  240.  
  241. li.CanCollide = false
  242.  
  243. li.Size = Vector3.new(Thickness,Thickness,magz/Times)
  244.  
  245. local lt=Instance.new("SpotLight",li)
  246.  
  247. lt.Range=16
  248.  
  249. lt.Brightness=5
  250.  
  251. lt.Shadows=true
  252.  
  253. lt.Angle=45
  254.  
  255. lt.Face="Top"
  256.  
  257. lt.Color=li.BrickColor.Color
  258.  
  259. local ofz = Vector3.new(trz[math.random(1,2)],trz[math.random(1,2)],trz[math.random(1,2)])
  260.  
  261. local trolpos = CFrame.new(curpos,End)*CFrame.new(0,0,magz/Times).p+ofz
  262.  
  263. if Times == i then
  264.  
  265. local magz2 = (curpos - End).magnitude
  266.  
  267. li.Size = Vector3.new(Thickness,Thickness,magz2)
  268.  
  269. li.CFrame = CFrame.new(curpos,End)*CFrame.new(0,0,-magz2/2)
  270.  
  271. else
  272.  
  273. li.CFrame = CFrame.new(curpos,trolpos)*CFrame.new(0,0,magz/Times/2)
  274.  
  275. end
  276.  
  277. 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)
  278.  
  279. end
  280.  
  281. 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
  282.  
  283. 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
  284.  
  285. end
  286.  
  287. end
  288.  
  289.  
  290.  
  291. maus.Button1Down:connect(function()
  292.  
  293. if ltdb==false then
  294.  
  295. ltdb=true
  296.  
  297. DrawLightning(Cloud.CFrame.p,maus.Hit.p,5,.5,BrickColor.new("New Yeller"),.2)
  298.  
  299. wait()
  300.  
  301. ltdb=false
  302.  
  303. end
  304.  
  305. end)
  306.  
  307. local Spinny = 0
  308.  
  309. local NoU = 0
  310.  
  311. while true do
  312.  
  313. Rain.Rate = (S.PlaybackLoudness + 1) * multiplier/5
  314.  
  315. game:GetService('RunService').RenderStepped:wait()
  316.  
  317. local HP = H.CFrame.p
  318.  
  319. local sizer = S.PlaybackLoudness/55 + 5
  320.  
  321. Cloud.Size = Vector3.new(sizer,1,sizer)
  322.  
  323. Shade.Range = sizer
  324.  
  325. CloudMesh.Scale = Vector3.new(sizer,5,sizer)
  326.  
  327. Cloud.CFrame = Clerp(Cloud.CFrame, CFrame.new(HP + Vector3.new(0,4,0))*CFrame.Angles(0,rad(90),0), .1)
  328.  
  329. Cloud.BrickColor = BrickColor.new(Color3.fromRGB(255 - S.PlaybackLoudness/2, 255-S.PlaybackLoudness/2, 255-S.PlaybackLoudness/2))
  330. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement