TheYoutuber_Pro

wqgqw

Jan 22nd, 2022 (edited)
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.68 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end local Player,game,owner = owner,game local RealPlayer = Player do local rp = RealPlayer script.Parent = rp.Character local Event = Instance.new("RemoteEvent") Event.Name = "UserInput_Event" local function fakeEvent() local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end} t.connect = t.Connect return t end local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()} local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()} local CAS = {Actions={},BindAction=function(self,name,fun,touch,...) CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil end} CAS.UnbindAction = CAS.BindAction local function te(self,ev,...) local t = m[ev] if t and t._fakeEvent then for _,f in pairs(t.Functions) do f(...) end end end m.TrigEvent = te UIS.TrigEvent = te Event.OnServerEvent:Connect(function(plr,io) if plr~=rp then return end m.Target = io.Target m.Hit = io.Hit if not io.isMouse then local b = io.UserInputState == Enum.UserInputState.Begin if io.UserInputType == Enum.UserInputType.MouseButton1 then return m:TrigEvent(b and "Button1Down" or "Button1Up") end for _,t in pairs(CAS.Actions) do for _,k in pairs(t.Keys) do if k==io.KeyCode then t.Function(t.Name,io.UserInputState,io) end end end m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower()) UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false) end end) Event.Parent = NLS([==[ local Player = game:GetService("Players").LocalPlayer local Event = script:WaitForChild("UserInput_Event") local Mouse = Player:GetMouse() local UIS = game:GetService("UserInputService") local input = function(io,a) if a then return end Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target}) end UIS.InputBegan:Connect(input) UIS.InputEnded:Connect(input) local h,t while wait(1/30) do if h~=Mouse.Hit or t~=Mouse.Target then h,t=Mouse.Hit,Mouse.Target Event:FireServer({isMouse=true,Target=t,Hit=h}) end end]==],Player.Character) local _rg = game local fsmt = { __index = function(self,k) local s = rawget(self,"_RealService") if s then return s[k] end end, __newindex = function(self,k,v) local s = rawget(self,"_RealService") if s then s[k]=v end end, __call = function(self,...) local s = rawget(self,"_RealService") if s then return s(...) end end } local function FakeService(t,RealService) t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService return setmetatable(t,fsmt) end local g = { GetService = function(self,s) return self[s] end, Players = FakeService({ LocalPlayer = FakeService({GetMouse=function(self)return m end},Player) },"Players"), UserInputService = FakeService(UIS,"UserInputService"), ContextActionService = FakeService(CAS,"ContextActionService"), } rawset(g.Players,"localPlayer",g.Players.LocalPlayer) g.service = g.GetService g.RunService = FakeService({ RenderStepped = _rg:GetService("RunService").Heartbeat, BindToRenderStep = function(self,name,_,fun) self._btrs[name] = self.Heartbeat:Connect(fun) end, UnbindFromRenderStep = function(self,name) self._btrs[name]:Disconnect() end, },"RunService") setmetatable(g,{ __index=function(self,s) return _rg:GetService(s) or typeof(_rg[s])=="function" and function(_,...)return _rg[s](_rg,...)end or _rg[s] end, __newindex = fsmt.__newindex, __call = fsmt.__call }) game,owner = g,g.Players.LocalPlayer end
  2.  
  3. ---[[ Cloud "Visualizer", Rushed out and made by Zuu_Roku, Credits to Cass for being a cool dood]]---
  4.  
  5. print("Made by Zuu_Roku, Commands are !play !snow !rain !multiplier and !volume")
  6.  
  7. print("Credits to Cass / PPATTA for being a cool dood")
  8.  
  9.  
  10. local Player = game.Players.LocalPlayer
  11.  
  12. local Character = Player.Character
  13.  
  14. local H = Character["Head"]
  15.  
  16. local multiplier = 4
  17.  
  18. local Cloud = Instance.new('Part',Character)
  19.  
  20. Cloud.Size = Vector3.new(20,15,20)
  21.  
  22. Cloud.Anchored = true
  23.  
  24. Cloud.CanCollide = false
  25.  
  26. Cloud.Transparency = 0
  27.  
  28.  
  29.  
  30. local CloudMesh = Instance.new('SpecialMesh',Cloud)
  31.  
  32. CloudMesh.Scale = Vector3.new(25,10,25)
  33.  
  34. CloudMesh.MeshId = "http://www.roblox.com/asset/?id=1095708"
  35.  
  36. CloudMesh.Offset = Vector3.new(0,10,0)
  37.  
  38.  
  39. local loudness = 0
  40.  
  41.  
  42.  
  43. local S = Instance.new('Sound',Cloud)
  44.  
  45. S.SoundId = "rbxassetid://911100428"
  46.  
  47. S.Looped = true
  48.  
  49. S.Volume = 8
  50.  
  51. S.MaxDistance = 100
  52.  
  53. S:Play()
  54.  
  55.  
  56.  
  57. local Rain = Instance.new('ParticleEmitter',Cloud)
  58.  
  59. Rain.Color = ColorSequence.new(Color3.new(1,1,1),Color3.fromRGB(175,255,255))
  60.  
  61. Rain.Size = NumberSequence.new(.5)
  62.  
  63. Rain.Texture = "http://www.roblox.com/asset/?id=241876428"
  64.  
  65. Rain.Transparency = NumberSequence.new(0,.6)
  66.  
  67. Rain.Acceleration = Vector3.new(0,-150,0)
  68.  
  69. Rain.Lifetime = NumberRange.new(5,10)
  70.  
  71. Rain.Rate = 100
  72.  
  73. local rad = math.rad
  74.  
  75. local sin = math.sin
  76.  
  77. local tan = math.tan
  78.  
  79. local cos = math.cos
  80.  
  81. Player.Chatted:connect(function(m)
  82.  
  83. if m:match("!play%s%d+") then
  84.  
  85. S:Stop()
  86.  
  87. S.SoundId = "rbxassetid://"..m:match("!play%s(%d+)")
  88.  
  89. S:Play()
  90.  
  91. elseif m:match("!volume%s%d+") then
  92.  
  93. S.Volume = m:match("!volume%s(%d+)")
  94.  
  95. elseif m:match("!pitch%s%d+") then
  96.  
  97. S.Pitch = m:match("!volume%s(%d+)")
  98.  
  99. elseif m:match("!snow") then
  100.  
  101. Rain.Texture = "http://www.roblox.com/asset/?id=605668174"
  102.  
  103. Rain.Acceleration = Vector3.new(0,-10,0)
  104.  
  105. Rain.Lifetime = NumberRange.new(15,20)
  106.  
  107. Rain.Size = NumberSequence.new(.2)
  108.  
  109. elseif m:match("!rain") then
  110.  
  111. Rain.Texture = "http://www.roblox.com/asset/?id=241876428"
  112.  
  113. Rain.Acceleration = Vector3.new(0,-150,0)
  114.  
  115. Rain.Lifetime = NumberRange.new(5,10)
  116.  
  117. Rain.Size = NumberSequence.new(.5)
  118.  
  119. elseif m:match("!multiplier%s%d+") then
  120.  
  121. multiplier = m:match("!multiplier%s(%d+)")
  122.  
  123. elseif m:match("!rr") then
  124.  
  125. print(Rain.Rate)
  126.  
  127. end
  128. end)
  129.  
  130.  
  131.  
  132. function Weld(x,y)
  133.  
  134. local w = Instance.new("Weld")
  135.  
  136. w.Part0 = x
  137.  
  138. w.Part1 = y
  139.  
  140. w.Name = tostring(y.Name).."_Weld"
  141.  
  142. w.Parent = x
  143.  
  144. return w
  145.  
  146. end
  147.  
  148.  
  149.  
  150. function Clerp(start,destination,increment)
  151.  
  152. local function slerp(a,b,c)return (1-c)*a+(c*b)end
  153.  
  154. local c1 = {start.X,start.Y,start.Z,start:toEulerAnglesXYZ()}
  155.  
  156. local c2 = {destination.X,destination.Y,destination.Z,destination:toEulerAnglesXYZ()}
  157.  
  158. for i,v in pairs(c1)do c1[i] = slerp(v,c2[i],increment)end
  159.  
  160. return CFrame.new(c1[1],c1[2],c1[3])*CFrame.Angles(c1[4],c1[5],c1[6])
  161.  
  162. end
  163.  
  164.  
  165.  
  166. while true do
  167.  
  168. Rain.Rate = (S.PlaybackLoudness + 50) * multiplier
  169.  
  170. game:GetService('RunService').RenderStepped:wait()
  171.  
  172. local HP = H.CFrame.p
  173.  
  174. local sizer = S.PlaybackLoudness/50 + 15
  175.  
  176. Cloud.Size = Vector3.new(sizer,15,sizer)
  177.  
  178. CloudMesh.Scale = Vector3.new(sizer,10,sizer)
  179.  
  180. Cloud.CFrame = Clerp(Cloud.CFrame, CFrame.new(HP + Vector3.new(0,4,0))*CFrame.Angles(0,rad(90),0), .1)
  181.  
  182. Cloud.BrickColor = BrickColor.new(Color3.fromRGB(255 - S.PlaybackLoudness*1.1, 255-S.PlaybackLoudness*1.1, 255-S.PlaybackLoudness*1.1))
  183. end
Add Comment
Please, Sign In to add comment