Advertisement
Guest User

ez

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