Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Noteblock Visualizer by fusionfriends, don't leak plox
- local Player = owner
- repeat wait() until Player.Character
- local Character = Player.Character
- local HumanoidRootPart = Character.HumanoidRootPart
- local Facevalue = 0
- local TweenService = game:GetService("TweenService")
- local MarketplaceService = game:GetService("MarketplaceService")
- local Colors = {
- Color3.fromRGB(255,0,0),
- Color3.fromRGB(0,255,0),
- Color3.fromRGB(0,0,255)
- }
- local CanBoop = true
- local Intt = 0
- -- Instancing
- local Noteblock = Instance.new("Part",Character)
- Noteblock.Size = Vector3.new(1.5,1.5,1.5)
- Noteblock.Anchored = true
- Noteblock.CanCollide = false
- Noteblock.Locked = true
- Noteblock.Name = "Noteblock"
- Noteblock.TopSurface = Enum.SurfaceType.Smooth
- Noteblock.BottomSurface = Enum.SurfaceType.Smooth
- local Light = Instance.new("PointLight",Noteblock)
- local Music = Instance.new("Sound",Noteblock)
- Music.Name = "Music"
- Music.Volume = 3
- Music.Looped = true
- local Notes = Instance.new("ParticleEmitter",Noteblock)
- Notes.SpreadAngle = Vector2.new(10000,10000)
- Notes.Texture = "rbxassetid://3155100507"
- Notes.Drag = 3
- Notes.Speed = NumberRange.new(10,10)
- Notes.Rate = 5
- Notes.Lifetime = NumberRange.new(1,1)
- Notes.Name = "Notes"
- Notes.Color = ColorSequence.new(Color3.fromRGB(255,0,0))
- Notes.Transparency = NumberSequence.new(1,1)
- Notes.Size = NumberSequence.new(.5,.5)
- local Notes2 = Notes:Clone()
- Notes2.Parent = Noteblock
- Notes2.Color = ColorSequence.new(Color3.fromRGB(0,255,0))
- local Notes3 = Notes:Clone()
- Notes3.Parent = Noteblock
- Notes3.Color = ColorSequence.new(Color3.fromRGB(0,0,255))
- local BillboardGui = Instance.new("BillboardGui",Noteblock)
- BillboardGui.MaxDistance = 100
- BillboardGui.AlwaysOnTop = true
- BillboardGui.StudsOffset = Vector3.new(0,6,0)
- BillboardGui.Size = UDim2.new(.5,0,.5,0)
- local TextLabel = Instance.new("TextLabel",BillboardGui)
- TextLabel.Position = UDim2.new(.5,0,.5,0)
- TextLabel.AnchorPoint = Vector2.new(.5,.5)
- TextLabel.TextSize = 12
- TextLabel.Font = Enum.Font.Arcade
- TextLabel.Text = "Playing - Nothing!"
- for i = 1,6 do
- wait()
- Facevalue = Facevalue+1
- local Decal = Instance.new("Decal",Noteblock)
- Decal.Texture = "rbxassetid://3153290572"
- if Facevalue == 1 then
- Decal.Face = Enum.NormalId.Front
- elseif Facevalue == 2 then
- Decal.Face = Enum.NormalId.Back
- elseif Facevalue == 3 then
- Decal.Face = Enum.NormalId.Left
- elseif Facevalue == 4 then
- Decal.Face = Enum.NormalId.Right
- elseif Facevalue == 5 then
- Decal.Face = Enum.NormalId.Top
- elseif Facevalue == 6 then
- Decal.Face = Enum.NormalId.Bottom
- end
- end
- -- LoudnessEvent
- local LoudnessEvent = Instance.new("RemoteEvent")
- LoudnessEvent.Name = "LoudnessEvent"
- LoudnessEvent.Parent = NLS([==[
- local Music = owner.Character.Noteblock:WaitForChild("Music")
- local LoudnessEvent = script.LoudnessEvent
- game:GetService("RunService").Heartbeat:Connect(function()
- LoudnessEvent:FireServer(Music.PlaybackLoudness)
- end)
- ]==],owner.PlayerGui)
- LoudnessEvent.OnServerEvent:Connect(function(Plr,PL)
- Update(PL)
- end)
- -- Functions
- function Update(PL)
- Noteblock.Size = Noteblock.Size:lerp(Vector3.new(PL/300+1.5,PL/300+1.5,PL/300+1.5),.1)
- Noteblock.CFrame = Noteblock.CFrame:lerp(CFrame.new(HumanoidRootPart.Position.X,HumanoidRootPart.Position.Y+7,HumanoidRootPart.Position.Z)*CFrame.Angles(math.rad(Noteblock.Orientation.X+1),math.rad(Noteblock.Orientation.Y-2),math.rad(Noteblock.Orientation.Z+2)),.1)
- Notes.Transparency = NumberSequence.new(1-PL/500,1-PL/500)
- Notes2.Transparency = NumberSequence.new(1-PL/500,1-PL/500)
- Notes3.Transparency = NumberSequence.new(1-PL/500,1-PL/500)
- Light.Range = PL/100+8
- if PL/300 >= 1.5 then
- if CanBoop then
- CanBoop = false
- local Clone = Noteblock:Clone()
- local Weld = Instance.new("Weld",Clone)
- Clone.Music:Destroy()
- Clone.PointLight:Destroy()
- Clone.BillboardGui:Destroy()
- Clone.Parent = workspace
- Clone.Name = "Bam"
- Clone.Anchored = false
- Clone.TopSurface = Enum.SurfaceType.Smooth
- Clone.BottomSurface = Enum.SurfaceType.Smooth
- Weld.Part1 = Clone
- Weld.Part0 = Noteblock
- for i = 1,10 do
- wait()
- Clone.Size = Vector3.new(Clone.Size.X+.2,Clone.Size.Y+.2,Clone.Size.Z+.2)
- Clone.Transparency = Clone.Transparency+.1
- for i,v in pairs(Clone:GetChildren()) do
- if v:IsA("Decal") then
- v.Transparency = v.Transparency+.1
- elseif v.Name == "Notes" then
- v:Destroy()
- end
- end
- end
- Clone:Destroy()
- CanBoop = true
- end
- end
- end
- Player.Chatted:Connect(function(Message)
- if Message:sub(1,5) == ";Play" then
- local ID = Message:sub(7,#Message)
- Music.SoundId = ("rbxassetid://"..ID)
- Music:Play()
- local SoundInfo = MarketplaceService:GetProductInfo(ID,Enum.InfoType.Asset)
- TextLabel.Text = ("Playing - "..SoundInfo.Name)
- end
- end)
- -- Loops
- while wait(0.5) do
- if Intt == #Colors then
- Intt = 0
- end
- Intt = Intt+1
- TweenService:Create(TextLabel,TweenInfo.new(1),{TextColor3 = Colors[Intt]}):Play()
- end
- print ("Noteblock visualizer by fusionfriends has been loaded!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement