Advertisement
tvnvntjyvtny2222

Untitled

Sep 9th, 2018
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.33 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
  2. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  3. local RealPlayer = Player
  4. 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
  5. local Player = game:GetService("Players").SlobberyMist9
  6. local Mouse,mouse,UserInputService,ContextActionService
  7. do
  8. script.Parent = Player.Character
  9. local CAS = {Actions={}}
  10. local Event = Instance.new("RemoteEvent")
  11. Event.Name = "UserInput_Event"
  12. Event.Parent = Player.Character
  13. local fakeEvent = function()
  14. local t = {_fakeEvent=true}
  15. t.Connect = function(self,f)self.Function=f end
  16. t.connect = t.Connect
  17. return t
  18. end
  19. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  20. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  21. function CAS:BindAction(name,fun,touch,...)
  22. CAS.Actions[name] = {Name=name,Function=fun,Keys={...}}
  23. end
  24. function CAS:UnbindAction(name)
  25. CAS.Actions[name] = nil
  26. end
  27. local function te(self,ev,...)
  28. local t = m[ev]
  29. if t and t._fakeEvent and t.Function then
  30. t.Function(...)
  31. end
  32. end
  33. m.TrigEvent = te
  34. UIS.TrigEvent = te
  35. Event.OnServerEvent:Connect(function(plr,io)
  36. if plr~=Player then return end
  37. if io.isMouse then
  38. m.Target = io.Target
  39. m.Hit = io.Hit
  40. elseif io.UserInputType == Enum.UserInputType.MouseButton1 then
  41. if io.UserInputState == Enum.UserInputState.Begin then
  42. m:TrigEvent("Button1Down")
  43. else
  44. m:TrigEvent("Button1Up")
  45. end
  46. else
  47. for n,t in pairs(CAS.Actions) do
  48. for _,k in pairs(t.Keys) do
  49. if k==io.KeyCode then
  50. t.Function(t.Name,io.UserInputState,io)
  51. end
  52. end
  53. end
  54. if io.UserInputState == Enum.UserInputState.Begin then
  55. m:TrigEvent("KeyDown",io.KeyCode.Name:lower())
  56. UIS:TrigEvent("InputBegan",io,false)
  57. else
  58. m:TrigEvent("KeyUp",io.KeyCode.Name:lower())
  59. UIS:TrigEvent("InputEnded",io,false)
  60. end
  61. end
  62. end)
  63. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  64. end
  65. ---[[ Cloud "Visualizer", Rushed out and made by Zuu_Roku, Credits to Cass for being a cool dood]]---
  66.  
  67. print("Made by Zuu_Roku, Commands are !play !snow !rain !multiplier and !volume")
  68.  
  69. print("Credits to Cass / PPATTA for being a cool dood")
  70.  
  71.  
  72. local Player = game.Players.LocalPlayer
  73.  
  74. local Character = Player.Character
  75.  
  76. local H = Character["Head"]
  77.  
  78. local multiplier = 4
  79.  
  80. local Cloud = Instance.new('Part',Character)
  81.  
  82. Cloud.Size = Vector3.new(20,15,20)
  83.  
  84. Cloud.Anchored = true
  85.  
  86. Cloud.CanCollide = false
  87.  
  88. Cloud.Transparency = 0
  89.  
  90.  
  91.  
  92. local CloudMesh = Instance.new('SpecialMesh',Cloud)
  93.  
  94. CloudMesh.Scale = Vector3.new(25,10,25)
  95.  
  96. CloudMesh.MeshId = "http://www.roblox.com/asset/?id=1095708"
  97.  
  98. CloudMesh.Offset = Vector3.new(0,10,0)
  99.  
  100.  
  101. local loudness = 0
  102.  
  103.  
  104.  
  105. local S = Instance.new('Sound',Cloud)
  106.  
  107. S.SoundId = "rbxassetid://242886251"
  108.  
  109. S.Looped = true
  110.  
  111. S.Volume = 6
  112.  
  113. S.MaxDistance = 100
  114.  
  115. S:Play()
  116.  
  117.  
  118.  
  119. local Rain = Instance.new('ParticleEmitter',Cloud)
  120.  
  121. Rain.Color = ColorSequence.new(Color3.new(1,1,1),Color3.fromRGB(175,255,255))
  122.  
  123. Rain.Size = NumberSequence.new(.5)
  124.  
  125. Rain.Texture = "http://www.roblox.com/asset/?id=241876428"
  126.  
  127. Rain.Transparency = NumberSequence.new(0,.6)
  128.  
  129. Rain.Acceleration = Vector3.new(0,-150,0)
  130.  
  131. Rain.Lifetime = NumberRange.new(5,10)
  132.  
  133. Rain.Rate = 100
  134.  
  135. local rad = math.rad
  136.  
  137. local sin = math.sin
  138.  
  139. local tan = math.tan
  140.  
  141. local cos = math.cos
  142.  
  143. Player.Chatted:connect(function(m)
  144.  
  145. if m:match("!play%s%d+") then
  146.  
  147. S:Stop()
  148.  
  149. S.SoundId = "rbxassetid://"..m:match("!play%s(%d+)")
  150.  
  151. S:Play()
  152.  
  153. elseif m:match("!volume%s%d+") then
  154.  
  155. S.Volume = m:match("!volume%s(%d+)")
  156.  
  157. elseif m:match("!pitch%s%d+") then
  158.  
  159. S.Pitch = m:match("!volume%s(%d+)")
  160.  
  161. elseif m:match("!snow") then
  162.  
  163. Rain.Texture = "http://www.roblox.com/asset/?id=605668174"
  164.  
  165. Rain.Acceleration = Vector3.new(0,-10,0)
  166.  
  167. Rain.Lifetime = NumberRange.new(15,20)
  168.  
  169. Rain.Size = NumberSequence.new(.2)
  170.  
  171. elseif m:match("!rain") then
  172.  
  173. Rain.Texture = "http://www.roblox.com/asset/?id=241876428"
  174.  
  175. Rain.Acceleration = Vector3.new(0,-150,0)
  176.  
  177. Rain.Lifetime = NumberRange.new(5,10)
  178.  
  179. Rain.Size = NumberSequence.new(.5)
  180.  
  181. elseif m:match("!multiplier%s%d+") then
  182.  
  183. multiplier = m:match("!multiplier%s(%d+)")
  184.  
  185. elseif m:match("!rr") then
  186.  
  187. print(Rain.Rate)
  188.  
  189. end
  190. end)
  191.  
  192.  
  193.  
  194. function Weld(x,y)
  195.  
  196. local w = Instance.new("Weld")
  197.  
  198. w.Part0 = x
  199.  
  200. w.Part1 = y
  201.  
  202. w.Name = tostring(y.Name).."_Weld"
  203.  
  204. w.Parent = x
  205.  
  206. return w
  207.  
  208. end
  209.  
  210.  
  211.  
  212. function Clerp(start,destination,increment)
  213.  
  214. local function slerp(a,b,c)return (1-c)*a+(c*b)end
  215.  
  216. local c1 = {start.X,start.Y,start.Z,start:toEulerAnglesXYZ()}
  217.  
  218. local c2 = {destination.X,destination.Y,destination.Z,destination:toEulerAnglesXYZ()}
  219.  
  220. for i,v in pairs(c1)do c1[i] = slerp(v,c2[i],increment)end
  221.  
  222. return CFrame.new(c1[1],c1[2],c1[3])*CFrame.Angles(c1[4],c1[5],c1[6])
  223.  
  224. end
  225.  
  226.  
  227.  
  228. while true do
  229.  
  230. Rain.Rate = (S.PlaybackLoudness + 50) * multiplier
  231.  
  232. game:GetService('RunService').RenderStepped:wait()
  233.  
  234. local HP = H.CFrame.p
  235.  
  236. local sizer = S.PlaybackLoudness/50 + 15
  237.  
  238. Cloud.Size = Vector3.new(sizer,15,sizer)
  239.  
  240. CloudMesh.Scale = Vector3.new(sizer,10,sizer)
  241.  
  242. Cloud.CFrame = Clerp(Cloud.CFrame, CFrame.new(HP + Vector3.new(0,4,0))*CFrame.Angles(0,rad(90),0), .1)
  243.  
  244. Cloud.BrickColor = BrickColor.new(Color3.fromRGB(255 - S.PlaybackLoudness*1.1, 255-S.PlaybackLoudness*1.1, 255-S.PlaybackLoudness*1.1))
  245. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement