Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local plr = game:GetService("Players").LocalPlayer
- local char = plr.Character
- local X
- local Y
- local Z
- X=1.0
- Y=1.0
- Z=1.0
- local part = Instance.new("Part", char)
- part.Name = "Visualizer"
- part.Size = Vector3.new(2,2,2)
- part.CanCollide = false
- part.Anchored = false
- part.Material = Enum.Material.Neon
- part.BrickColor = BrickColor.new("Really black")
- local bp = Instance.new("BodyPosition", part)
- local mesh = Instance.new("SpecialMesh", part)
- local scale = mesh.Scale
- scale = Vector3.new(1,1,1)
- local sound = Instance.new("Sound", char.HumanoidRootPart)
- sound.Name = "Music"
- sound.SoundId = "rbxassetid://1264646941"
- sound.Volume = 10
- sound.Looped = true
- sound:Play()
- local ff = Instance.new("ForceField")
- ff.Parent = char
- function rainb(hue)
- local section = hue % 1 * 3
- local secondary = 0.5 * math.pi * (section % 1)
- if section < 1 then
- return Color3.new(1, 1 - math.cos(secondary), 1 - math.sin(secondary))
- elseif section < 2 then
- return Color3.new(1 - math.sin(secondary), 1, 1 - math.cos(secondary))
- else
- return Color3.new(1 - math.cos(secondary), 1 - math.sin(secondary), 1)
- end
- end
- game:GetService('RunService').RenderStepped:connect(function()
- mesh.MeshType = Enum.MeshType.Brick
- mesh.Scale = mesh.Scale:lerp(Vector3.new(scale.X+sound.PlaybackLoudness/100,scale.Y+sound.PlaybackLoudness/100,scale.Z+sound.PlaybackLoudness/100),0.8)
- local Color = rainb(tick()/20)
- part.Color = Color
- bp.Position = char.Head.Position + Vector3.new(0,sound.PlaybackLoudness/1000,0)
- part.CFrame = part.CFrame * CFrame.fromEulerAnglesXYZ(math.rad(X),math.rad(Y),math.rad(Z))
- char.Humanoid.MaxHealth = math.huge
- end)
- plr.Chatted:connect(function(msg)
- if msg:sub(1,5) == "Music" or msg:sub(1,5) == "music" then
- sound:Stop()
- sound.SoundId = "rbxassetid://"..msg:sub(7)
- sound:Play()
- end
- if msg:sub(1,6) == "Volume" or msg:sub(1,6) == "volume" then
- sound.Volume = msg:sub(8)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement