Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --https://github.com/Mokiros/roblox-FE-compatibility
- if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
- local Player,Mouse,mouse,UserInputService,ContextActionService = owner
- local RealPlayer = Player
- 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
- print([[
- This is my attempt at making an actual working visulizer.
- Credit to Kyutatsuki for "helping" me make this. Really couldn't have done this myself.
- - Theamazingnater
- P.S. More visulizers coming your way!
- Controls:
- play/(id)
- stop
- antideath on
- antideath off
- loop on
- loop off
- ]])
- wait(1/60)
- player = game.Players.LocalPlayer
- char = player.Character
- rs = game:GetService("RunService").RenderStepped
- local Radio = Instance.new("Part",char)
- Radio.CanCollide = false
- local RadioMesh = Instance.new("FileMesh",Radio)
- RadioMesh.MeshId = "rbxassetid://151760030"
- RadioMesh.TextureId = "rbxassetid://151760072"
- RadioMesh.Scale = Vector3.new(0.7,0.7,0.7)
- local RadioWeld = Instance.new("Weld",Radio)
- RadioWeld.Part0 = Radio
- RadioWeld.Part1 = char.Torso
- RadioWeld.C0 = CFrame.new(-0.0894899368, -0.236836433, 0.787712097, -0.867854834, 0.496817887, 0, 0.496817887, 0.867854834, 0, 0, 0, -1)
- local Sound = Instance.new("Sound",Radio)
- Sound.Volume = 4
- Sound.SoundId = "rbxassetid://"
- OriginalSize = Vector3.new(0.7,0.7,0.7)
- CanDie = true
- market = game:GetService("MarketplaceService")
- local BODY = {}
- LeftArm = char["Left Arm"]
- RightLeg = char["Right Leg"]
- LeftLeg = char["Left Leg"]
- for _, c in pairs(char:GetDescendants()) do
- if c:IsA("BasePart") and c.Name ~= "Handle" then
- 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
- c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
- end
- table.insert(BODY,{c,c.Parent,c.Material,c.Color,c.Transparency})
- elseif c:IsA("JointInstance") then
- table.insert(BODY,{c,c.Parent,nil,nil,nil})
- end
- end
- for e = 1, #BODY do
- if BODY[e] ~= nil then
- local STUFF = BODY[e]
- local PART = STUFF[1]
- local PARENT = STUFF[2]
- local MATERIAL = STUFF[3]
- local TRANSPARENCY = STUFF[5]
- if PART.ClassName == "Part" and PART ~= char.HumanoidRootPart then
- PART.Material = MATERIAL
- PART.Transparency = TRANSPARENCY
- end
- PART.AncestryChanged:Connect(function()
- PART.Parent = PARENT
- end)
- end
- end
- function refit()
- char.Parent = workspace
- for e = 1, #BODY do
- if BODY[e] ~= nil then
- local STUFF = BODY[e]
- local PART = STUFF[1]
- local PARENT = STUFF[2]
- local MATERIAL = STUFF[3]
- local TRANSPARENCY = STUFF[5]
- if PART.ClassName == "Part" and PART ~= char.HumanoidRootPart then
- PART.Material = MATERIAL
- PART.Transparency = TRANSPARENCY
- end
- if PART.Parent ~= PARENT then
- char:FindFirstChildOfClass("Humanoid"):remove()
- PART.Parent = PARENT
- Humanoid = Instance.new("Humanoid",char)
- end
- end
- end
- end
- char.Humanoid.Died:connect(function()
- if CanDie == false then
- refit()
- end
- end)
- player.Chatted:connect(function(msg)
- if msg:sub(1,5) == "play/" then
- Sound:Stop()
- Sound.SoundId = "rbxassetid://" .. msg:sub(6)
- Sound:Play()
- Music = market:GetProductInfo(msg:sub(6))
- print("Now playing, " .. Music.Name)
- end
- if msg == "stop" then
- Sound:Stop()
- print("Stopped the music/sound.")
- end
- if msg == "antideath on" then
- CanDie = false
- print("Antideath has been activated!")
- end
- if msg == "antideath off" then
- CanDie = true
- print("Oof! Antideath has been deactivated.")
- end
- if msg == "loop on" then
- print("Looping on!")
- Sound.Looped = true
- end
- if msg == "loop off" then
- print("Looping off!")
- Sound.Looped = false
- end
- end)
- while rs:wait() do
- if CanDie == false then
- refit()
- end
- Sound.Parent = Radio
- 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)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement