Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- // SaVio Visualizer
- script.Name = 'Fat'
- local Player = game:GetService('Players').LocalPlayer --// asd
- repeat wait() until Player.Character ~= nil
- local Character = Player.Character
- local Root = Character:WaitForChild('HumanoidRootPart') --// r15 support mk
- local Audio = 686574675 --657230380 --337053183 --652857160
- local Market = game:service'MarketplaceService'
- local Data = Market:GetProductInfo(Audio)
- local Sine, Change = 0, 1
- local Rbx = 'rbxassetid://'
- local Sound = Instance.new('Sound')
- Sound.SoundId = Rbx..Audio
- --Sound.Pitch = .65
- Sound.Volume = 10
- local Functions = {};
- local ScriptsSent = {};
- local Assets = {};
- local RenderStepped = game:GetService'RunService'.RenderStepped
- local Stepped = game:GetService'RunService'.Stepped
- function Functions:ReSurface(Part, Integer)
- if Part ~= nil and Part:IsA'BasePart' then
- Part.TopSurface = Integer
- Part.BottomSurface = Integer
- Part.LeftSurface = Integer
- Part.RightSurface = Integer
- Part.FrontSurface = Integer
- Part.BackSurface = Integer
- end
- end
- ArtificialHB = Instance.new("BindableEvent", script)
- ArtificialHB.Name = "Heartbeat"
- script:WaitForChild("Heartbeat")
- delay_per_second = 35
- frame = 1 / delay_per_second
- tf = 0
- allowframeloss = false
- tossremainder = false
- lastframe = tick()
- script.Heartbeat:Fire()
- game:GetService("RunService").Heartbeat:connect(function(s, p)
- tf = tf + s
- if tf >= frame then
- if allowframeloss then
- script.Heartbeat:Fire()
- lastframe = tick()
- else
- for i = 1, math.floor(tf / frame) do
- script.Heartbeat:Fire()
- end
- lastframe = tick()
- end
- if tossremainder then
- tf = 0
- else
- tf = tf - frame * math.floor(tf / frame)
- end
- end
- end)
- function swait(num)
- if num == 0 or num == nil then
- return ArtificialHB.Event:wait()
- else
- for i = 0, num do
- ArtificialHB.Event:wait()
- end
- end
- end
- function Functions:ni(name,prnt)
- return Instance.new(tostring(name),prnt)
- end
- function Functions:CLerp(c1,c2,al)
- local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()}
- local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()}
- for i,v in pairs(com1) do
- com1[i] = v+(com2[i]-v)*al
- end
- return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1)))--]]
- end
- function Functions:Lerp(c1,c2,al)
- return c1:lerp(c2, al)
- end
- function Functions:NewObject(Type, Parent, Others)
- if not Parent then
- Parent = workspace
- end
- local New = Functions:ni(Type)
- if New:IsA'BasePart' then
- Functions:ReSurface(New,10)
- New.Anchored = true
- New.Size = Vector3.new(1,1,1)
- New.CanCollide = false
- New.Locked = true
- end
- for i,v in next, Others do
- local suc,err = pcall(function()
- New[i] = v
- end)
- if not suc then
- print(err)
- end
- end
- New.Parent = Parent
- return New
- end
- --184415363
- function Functions:Rainbow(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
- local CurSong = ''
- function Functions:MakeVisualizer()
- local Rainbow = Functions:Rainbow(tick()/4)
- Assets = {};
- local Main = Functions:NewObject('Part', workspace, {
- Transparency = 0,
- Material = 'Neon',
- Size = Vector3.new(18,12,.2),
- CFrame = Root.CFrame * CFrame.new(0,1,-5) * CFrame.Angles(-math.rad(5),0,0),
- Color = Color3.new(0,0,0),
- });
- Sound.Parent = Main
- Sound.Volume = 10
- Sound:Play()
- local MainSurface = Functions:NewObject('SurfaceGui', Main,{Face = 'Back'});
- local Light = Functions:NewObject('SurfaceLight',Main,{
- Face = 'Back',
- Shadows = true,
- Color = Color3.new(.5,.5,.5),
- Brightness = 3,
- });
- local MainFrame = Functions:NewObject('Frame', MainSurface,{
- Size = UDim2.new(1,0,1,0),
- Position = UDim2.new(0,0,0),
- BackgroundTransparency=1,
- ClipsDescendants=true,
- BorderSizePixel = 0,
- ZIndex = 1
- });
- local fps = 0
- local link = ('https://www.roblox.com/library/%d/%s'):format(Data.AssetId,Data.Name)
- local Link = Functions:NewObject('TextLabel', MainFrame,{
- Size = UDim2.new(1,0,.1,0),
- BackgroundTransparency=1,
- BorderSizePixel = 0,
- ZIndex = 10,
- TextSize = 17,
- Font = 'SourceSans',
- TextColor3 = Color3.new(0,0,0),
- Text = link,
- });
- local Uploader = Functions:NewObject('TextLabel', MainFrame,{
- Size = UDim2.new(1,0,.1,-30),
- BackgroundTransparency=1,
- BorderSizePixel = 0,
- ZIndex = 10,
- TextSize = 15,
- Font = 'SourceSansBold',
- TextColor3 = Color3.new(0,0,0),
- Text = Data.Creator.Name,
- });
- local Info = Functions:NewObject('TextLabel', MainFrame,{
- Size = UDim2.new(1,0,1,0),
- BackgroundTransparency=1,
- BorderSizePixel = 0,
- ZIndex = 10,
- TextSize = 25,
- Font = 'SourceSansBold',
- TextColor3 = Color3.new(1,1,1),
- Text = 'loading...',
- });
- local Shader = 54888284
- local Background = 305407040
- local Gradient = 156579757 --154741878
- local Max, Up = 1,.025
- local Labels = {};
- local index = 0
- function lnum(a, b, c)
- return a + (b - a) * c;
- end;
- local BallId = 284205403 --502107146 --78066936
- local BallImg = Functions:NewObject('ImageLabel', MainFrame,{
- Position = UDim2.new(.5,-225,.5,-200),
- Size = UDim2.new(0,450,0,400),
- BackgroundTransparency=1,
- BorderSizePixel = 0,
- Rotation = 25,
- ImageColor3 = Color3.new(0,0,0),
- Image = Rbx..BallId,
- ZIndex = 4,
- });
- local Bg = Functions:NewObject('ImageLabel', MainFrame, {
- Size = UDim2.new(1,0,1,0),
- BackgroundTransparency=1,
- BorderSizePixel = 0,
- ImageTransparency = .05,
- Image = Rbx..Background,
- ZIndex = 1,
- });
- local Shade = Functions:NewObject('ImageLabel', MainFrame, {
- Size = UDim2.new(1,0,1,0),
- BackgroundTransparency=1,
- BorderSizePixel = 0,
- ImageTransparency = 0,
- Image = Rbx..Gradient,
- ZIndex = 10,
- });
- for i = 0,Max,Up do
- index=index+1
- local Label = Functions:NewObject('ImageLabel', MainFrame,{
- Position = UDim2.new(i,0,1,-10),
- Size = UDim2.new(Up/1.1,0,0,10),
- BackgroundTransparency=1,
- BorderSizePixel = 0,
- ImageColor3 = Color3.new(0,0,0),
- Image = Rbx..Gradient,
- ZIndex = 2,
- });
- table.insert(Labels,{Ui=Label,SScale = Label.Size.X.Scale, PScale = Label.Position.X.Scale,Total=Label.Size})
- end
- local Speed = 3
- spawn(function()
- while true do
- swait(8)
- local Spec = Functions:NewObject('ImageLabel', MainFrame,{
- Size = UDim2.new(0,1,0,1),
- Position = UDim2.new(.5,-6.5,.5,-6),
- BackgroundTransparency=1,
- BorderSizePixel = 0,
- Image = Rbx..284205403,
- ImageColor3 = Color3.new(0,0,0),
- ZIndex = 1,
- });
- spawn(function()
- Spec:TweenSize(UDim2.new(0,155,0,150),'Out','Linear',3,true)
- local mxd = 500
- local x,y=math.random(-mxd,mxd),math.random(-mxd/1.5,mxd/1.5)
- Spec.Position = UDim2.new(.5,x-(52.5),.5,y-(50))
- for i = 0,1,.025 do
- Spec.ImageTransparency = lnum(Spec.ImageTransparency, i, .5)
- Spec:TweenPosition(UDim2.new(.5,x,.5,y-(100)),'Out','Linear',Speed,true)
- RenderStepped:wait()
- end
- Spec:Destroy()
- end)
- end
- end)
- local function formatminutes(num)
- local ret = 'error; 0:00'
- if num < 60 then
- if num < 10 then
- ret = '0:0'..num
- else
- ret = '0:'..num
- end
- elseif num >= 60 then
- local i = 0
- local count = num/60
- local total = num
- for int = 0,count do
- local alg = count * int
- for int2 = 1,59 do
- if tonumber(tostring(alg):sub(1,1))==int2 then
- i=i+1
- total=total-60
- end
- end
- end
- if total < 0 then
- total = 0
- end
- if total < 10 then
- total = '0'..total
- end
- ret = i..':'..total
- end
- return ret
- end
- local Loudness = 0
- Sound.Looped = true
- local Style = 'Back'
- local Olds = {};
- local LastL = 0
- Sound.Pitch = 1
- wait(1)
- --table.foreach(Data.Creator,print)
- while true do
- link = ('https://www.roblox.com/library/%d/%s'):format(Data.AssetId,Data.Name)
- Link.Text = link
- fps = 1/tf
- Loudness = Sound.PlaybackLoudness
- local boom = false
- if LastL + 200 < Loudness then
- boom = true
- print'boom hoe'
- end
- LastL = Loudness
- if Loudness > MainFrame.AbsoluteSize.Y - 100 then
- Loudness = MainFrame.AbsoluteSize.Y - 100
- end
- if #Olds > 5e4 then
- Olds = {};
- end
- table.insert(Olds, Loudness)
- local top = 0
- for i,v in next, Olds do
- top = top + v
- end
- Uploader.Text = Data.Creator.Name..' • '..Data.Creator.Id
- local Avg = top / (100+Loudness)
- Info.Text = formatminutes(math.floor(Sound.TimePosition))..' • '..formatminutes(math.floor(Sound.TimeLength))
- --Info.Text = 'Average Loudness: '..math.floor(Avg)..'\nTitle: '..Data.Name..'\nRefresh Rate: '..math.floor(fps*2)..' / ps'
- swait(0)
- Main.CFrame = Functions:Lerp(Main.CFrame, Root.CFrame * CFrame.new(0,3,-10) * CFrame.Angles(-math.rad(7.5),0,0), .15)
- local Max = Labels[1]
- local Speed, Default = .5, 10
- Max.Ui:TweenSizeAndPosition(UDim2.new(Max.SScale,0,0,-10-Loudness),UDim2.new(Max.PScale,0,1,0),'Out',Style,Speed,true)
- local MxAlg = (255/(MainFrame.AbsoluteSize.Y - Max.Ui.Size.Y.Offset))
- local MxClr = Color3.new(MxAlg,0,MxAlg)
- --Max.Ui.ImageColor3 = Functions:Lerp(Max.Ui.ImageColor3, MxClr, .2)
- local TAlg = Sound.PlaybackLoudness/1.5
- local Trans = ((1/TAlg)*6)
- if TAlg < 1 then
- Trans = 1
- end
- local Rng = (8/Trans)
- Light.Range = lnum(Light.Range, Rng/2, .2)
- Shade.ImageTransparency = lnum(Shade.ImageTransparency, 1-(Trans/2) ,.1)
- BallImg:TweenSizeAndPosition(UDim2.new(0,250+TAlg,0,200+TAlg), UDim2.new(.5,-125-(TAlg/2),.5,-100-(TAlg/2)), 'Out', 'Elastic', .5, true)
- for i = 2,#Labels,1 do
- local Lbl = Labels[i]
- local Last = Labels[i-1]
- local Sz = Last.Ui.Size.Y.Offset
- local CurSz = Lbl.Ui.Size.Y.Offset
- Lbl.Ui:TweenSizeAndPosition(UDim2.new(Lbl.SScale,0,0,-10-Sz),UDim2.new(Lbl.PScale,0,1,0),'Out',Style,.01,true)
- local Alg = (255/((MainFrame.AbsoluteSize.Y/2) - CurSz))
- local Clr = Color3.new(Alg,0,Alg)
- --Lbl.Ui.ImageColor3 = Functions:Lerp(Lbl.Ui.ImageColor3, Clr, .2)
- --swait()
- end
- end
- end
- Player.Chatted:connect(function(Message)
- if Message:sub(1,1) == '!' and tonumber(Message:sub(2,2)) ~= nil then
- local LastId = Sound.SoundId
- local Success, Error = pcall(function()
- local Id = Message:sub(2)
- Audio = Id
- Sound.SoundId = Rbx..Id
- Sound:Play()
- Data = Market:GetProductInfo(Id)
- end)
- if not Success then
- Sound.SoundId = LastId
- Sound:Play()
- warn(Error)
- end
- end
- end)
- spawn(Functions.MakeVisualizer)
- warn('Loaded; created by SavageMunkey')
- print'Say "!" followed by an id to play a different sound'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement