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