Advertisement
End_Wolf

Untitled

Sep 9th, 2018
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --https://github.com/Mokiros/roblox-FE-compatibility
  2. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  3. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  4. local RealPlayer = Player
  5. 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
  6. print([[
  7. This is my attempt at making an actual working visulizer.
  8. Credit to Kyutatsuki for "helping" me make this. Really couldn't have done this myself.
  9. - Theamazingnater
  10.  
  11. P.S. More visulizers coming your way!
  12.  
  13.  
  14. Controls:
  15. play/(id)
  16. stop
  17. antideath on
  18. antideath off
  19. loop on
  20. loop off
  21. ]])
  22.  
  23. wait(1/60)
  24. player = game.Players.LocalPlayer
  25. char = player.Character
  26. rs = game:GetService("RunService").RenderStepped
  27.  
  28.  
  29. local Radio = Instance.new("Part",char)
  30. Radio.CanCollide = false
  31. local RadioMesh = Instance.new("FileMesh",Radio)
  32. RadioMesh.MeshId = "rbxassetid://151760030"
  33. RadioMesh.TextureId = "rbxassetid://151760072"
  34. RadioMesh.Scale = Vector3.new(0.7,0.7,0.7)
  35. local RadioWeld = Instance.new("Weld",Radio)
  36. RadioWeld.Part0 = Radio
  37. RadioWeld.Part1 = char.Torso
  38. RadioWeld.C0 = CFrame.new(-0.0894899368, -0.236836433, 0.787712097, -0.867854834, 0.496817887, 0, 0.496817887, 0.867854834, 0, 0, 0, -1)
  39. local Sound = Instance.new("Sound",Radio)
  40. Sound.Volume = 4
  41. Sound.SoundId = "rbxassetid://"
  42. OriginalSize = Vector3.new(0.7,0.7,0.7)
  43. CanDie = true
  44.  
  45. market = game:GetService("MarketplaceService")
  46.  
  47. local BODY = {}
  48. LeftArm = char["Left Arm"]
  49. RightLeg = char["Right Leg"]
  50. LeftLeg = char["Left Leg"]
  51. for _, c in pairs(char:GetDescendants()) do
  52. if c:IsA("BasePart") and c.Name ~= "Handle" then
  53. if c ~= char.HumanoidRootPart and c ~= char.Torso and c ~= char.Head and c ~= char["Right Arm"] and c ~= LeftArm and c ~= RightLeg and c ~= LeftLeg then
  54. c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
  55. end
  56. table.insert(BODY,{c,c.Parent,c.Material,c.Color,c.Transparency})
  57. elseif c:IsA("JointInstance") then
  58. table.insert(BODY,{c,c.Parent,nil,nil,nil})
  59. end
  60. end
  61. for e = 1, #BODY do
  62. if BODY[e] ~= nil then
  63. local STUFF = BODY[e]
  64. local PART = STUFF[1]
  65. local PARENT = STUFF[2]
  66. local MATERIAL = STUFF[3]
  67. local TRANSPARENCY = STUFF[5]
  68. if PART.ClassName == "Part" and PART ~= char.HumanoidRootPart then
  69. PART.Material = MATERIAL
  70. PART.Transparency = TRANSPARENCY
  71. end
  72. PART.AncestryChanged:Connect(function()
  73. PART.Parent = PARENT
  74. end)
  75. end
  76. end
  77. function refit()
  78. char.Parent = workspace
  79. for e = 1, #BODY do
  80. if BODY[e] ~= nil then
  81. local STUFF = BODY[e]
  82. local PART = STUFF[1]
  83. local PARENT = STUFF[2]
  84. local MATERIAL = STUFF[3]
  85. local TRANSPARENCY = STUFF[5]
  86. if PART.ClassName == "Part" and PART ~= char.HumanoidRootPart then
  87. PART.Material = MATERIAL
  88. PART.Transparency = TRANSPARENCY
  89. end
  90. if PART.Parent ~= PARENT then
  91. char:FindFirstChildOfClass("Humanoid"):remove()
  92. PART.Parent = PARENT
  93. Humanoid = Instance.new("Humanoid",char)
  94. end
  95. end
  96. end
  97. end
  98. char.Humanoid.Died:connect(function()
  99. if CanDie == false then
  100. refit()
  101. end
  102. end)
  103.  
  104. player.Chatted:connect(function(msg)
  105. if msg:sub(1,5) == "play/" then
  106. Sound:Stop()
  107. Sound.SoundId = "rbxassetid://" .. msg:sub(6)
  108. Sound:Play()
  109. Music = market:GetProductInfo(msg:sub(6))
  110. print("Now playing, " .. Music.Name)
  111. end
  112. if msg == "stop" then
  113. Sound:Stop()
  114. print("Stopped the music/sound.")
  115. end
  116. if msg == "antideath on" then
  117. CanDie = false
  118. print("Antideath has been activated!")
  119. end
  120. if msg == "antideath off" then
  121. CanDie = true
  122. print("Oof! Antideath has been deactivated.")
  123. end
  124. if msg == "loop on" then
  125. print("Looping on!")
  126. Sound.Looped = true
  127. end
  128. if msg == "loop off" then
  129. print("Looping off!")
  130. Sound.Looped = false
  131. end
  132. end)
  133.  
  134. while rs:wait() do
  135. if CanDie == false then
  136. refit()
  137. end
  138. Sound.Parent = Radio
  139. RadioMesh.Scale = RadioMesh.Scale:lerp(Vector3.new(OriginalSize.X+Sound.PlaybackLoudness/4000*3.5,OriginalSize.Y+Sound.PlaybackLoudness/4000*3.5,OriginalSize.Z+Sound.PlaybackLoudness/4000*3.5),0.8)
  140. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement