Advertisement
PiterMosskva_TV

aaaaaaclouddd

May 16th, 2019
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.37 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. ---[[ Cloud "Visualizer", Rushed out and made by Zuu_Roku, Credits to Cass for being a cool dood]]---
  87.  
  88. print("Made by Zuu_Roku, Commands are !play !snow !rain !multiplier and !volume")
  89.  
  90. print("Credits to Cass / PPATTA for being a cool dood")
  91.  
  92.  
  93. local Player = Owner
  94.  
  95. local Character = Owner.Character
  96.  
  97. local H = Character["Head"]
  98.  
  99. local multiplier = 4
  100.  
  101. local Cloud = Instance.new('Part',Character)
  102.  
  103. Cloud.Size = Vector3.new(20,15,20)
  104.  
  105. Cloud.Anchored = true
  106.  
  107. Cloud.CanCollide = false
  108.  
  109. Cloud.Transparency = 0
  110.  
  111.  
  112.  
  113. local CloudMesh = Instance.new('SpecialMesh',Cloud)
  114.  
  115. CloudMesh.Scale = Vector3.new(25,10,25)
  116.  
  117. CloudMesh.MeshId = "http://www.roblox.com/asset/?id=1095708"
  118.  
  119. CloudMesh.Offset = Vector3.new(0,10,0)
  120.  
  121.  
  122. local loudness = 0
  123.  
  124.  
  125.  
  126. local S = Instance.new('Sound',Cloud)
  127.  
  128. S.SoundId = "rbxassetid://745717581"
  129.  
  130. S.Looped = true
  131.  
  132. S.Volume = 8
  133.  
  134. S.MaxDistance = 100
  135.  
  136. S:Play()
  137.  
  138.  
  139.  
  140. local Rain = Instance.new('ParticleEmitter',Cloud)
  141.  
  142. Rain.Color = ColorSequence.new(Color3.new(1,1,1),Color3.fromRGB(175,255,255))
  143.  
  144. Rain.Size = NumberSequence.new(.5)
  145.  
  146. Rain.Texture = "http://www.roblox.com/asset/?id=241876428"
  147.  
  148. Rain.Transparency = NumberSequence.new(0,.6)
  149.  
  150. Rain.Acceleration = Vector3.new(0,-150,0)
  151.  
  152. Rain.Lifetime = NumberRange.new(5,10)
  153.  
  154. Rain.Rate = 100
  155.  
  156. local rad = math.rad
  157.  
  158. local sin = math.sin
  159.  
  160. local tan = math.tan
  161.  
  162. local cos = math.cos
  163.  
  164. Player.Chatted:connect(function(m)
  165.  
  166. if m:match("!play%s%d+") then
  167.  
  168. S:Stop()
  169.  
  170. S.SoundId = "rbxassetid://"..m:match("!play%s(%d+)")
  171.  
  172. S:Play()
  173.  
  174. elseif m:match("!volume%s%d+") then
  175.  
  176. S.Volume = m:match("!volume%s(%d+)")
  177.  
  178. elseif m:match("!pitch%s%d+") then
  179.  
  180. S.Pitch = m:match("!volume%s(%d+)")
  181.  
  182. elseif m:match("!snow") then
  183.  
  184. Rain.Texture = "http://www.roblox.com/asset/?id=605668174"
  185.  
  186. Rain.Acceleration = Vector3.new(0,-10,0)
  187.  
  188. Rain.Lifetime = NumberRange.new(15,20)
  189.  
  190. Rain.Size = NumberSequence.new(.2)
  191.  
  192. elseif m:match("!rain") then
  193.  
  194. Rain.Texture = "http://www.roblox.com/asset/?id=241876428"
  195.  
  196. Rain.Acceleration = Vector3.new(0,-150,0)
  197.  
  198. Rain.Lifetime = NumberRange.new(5,10)
  199.  
  200. Rain.Size = NumberSequence.new(.5)
  201.  
  202. elseif m:match("!multiplier%s%d+") then
  203.  
  204. multiplier = m:match("!multiplier%s(%d+)")
  205.  
  206. elseif m:match("!rr") then
  207.  
  208. print(Rain.Rate)
  209.  
  210. end
  211. end)
  212.  
  213.  
  214.  
  215. function Weld(x,y)
  216.  
  217. local w = Instance.new("Weld")
  218.  
  219. w.Part0 = x
  220.  
  221. w.Part1 = y
  222.  
  223. w.Name = tostring(y.Name).."_Weld"
  224.  
  225. w.Parent = x
  226.  
  227. return w
  228.  
  229. end
  230.  
  231.  
  232.  
  233. function Clerp(start,destination,increment)
  234.  
  235. local function slerp(a,b,c)return (1-c)*a+(c*b)end
  236.  
  237. local c1 = {start.X,start.Y,start.Z,start:toEulerAnglesXYZ()}
  238.  
  239. local c2 = {destination.X,destination.Y,destination.Z,destination:toEulerAnglesXYZ()}
  240.  
  241. for i,v in pairs(c1)do c1[i] = slerp(v,c2[i],increment)end
  242.  
  243. return CFrame.new(c1[1],c1[2],c1[3])*CFrame.Angles(c1[4],c1[5],c1[6])
  244.  
  245. end
  246.  
  247.  
  248.  
  249. while true do
  250.  
  251. Rain.Rate = (S.PlaybackLoudness + 50) * multiplier
  252.  
  253. game:GetService('RunService').RenderStepped:wait()
  254.  
  255. local HP = H.CFrame.p
  256.  
  257. local sizer = S.PlaybackLoudness/50 + 15
  258.  
  259. Cloud.Size = Vector3.new(sizer,15,sizer)
  260.  
  261. CloudMesh.Scale = Vector3.new(sizer,10,sizer)
  262.  
  263. Cloud.CFrame = Clerp(Cloud.CFrame, CFrame.new(HP + Vector3.new(0,4,0))*CFrame.Angles(0,rad(90),0), .1)
  264.  
  265. Cloud.BrickColor = BrickColor.new(Color3.fromRGB(255 - S.PlaybackLoudness*1.1, 255-S.PlaybackLoudness*1.1, 255-S.PlaybackLoudness*1.1))
  266. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement