tomonaoboys

tomonaoboys audio visualizer 2nd(changed2public)

Jan 26th, 2018
385
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 26.75 KB | None | 0 0
  1. print[[
  2. tomonaoboys's audio visualizer (2nd)
  3. v1.2 (maybe)
  4. it's just remake of my SHIT audio visualizer.
  5. i'm looking at :
  6. > more beautiful
  7. > easy to control
  8. > less laggy
  9. but im not good at them , so please ...idk.
  10. and if you couldn't read idks, you can watch helps with left Alt key.
  11. but I promise its useless because im not good for english...]]
  12. --[[NOT preset
  13. 340816884 (Nightcore - Good time)
  14. ]]
  15. local SoundId=nil local Volume=5 local oldSI=nil local Sync=false local SyncData={}local SyncTo=1
  16. local Player=game:service("Players").LocalPlayer
  17. script.Parent=Player:FindFirstChildOfClass("PlayerScripts")
  18. local Position=Vector3.new()local Time=0
  19. local RS=game:service("RunService").RenderStepped
  20. if 1 then local InsertModel=Instance.new'Model'GetInstance=function(CallInst,Parent)if InsertModel:FindFirstChildOfClass(CallInst)==nil then Instance.new(CallInst,InsertModel)end local Obj=InsertModel:Clone():FindFirstChildOfClass(CallInst)Obj.Parent=Parent or nil return Obj end end
  21. warn'3'
  22. local function sw(num)
  23.     if num~=nil then
  24.         for i=1,tonumber(num)do
  25.             RS:wait()
  26.         end
  27.     else
  28.         RS:wait()
  29.     end
  30.     return true
  31. end
  32. warn("Owner = "..tostring(Player))
  33. local Mouse=Player:GetMouse()
  34. local Alt=false
  35. Mouse.KeyDown:connect(function(ky)
  36. if ky=="4"then if Alt then Alt=false else Alt=true end end
  37. end)
  38. local Sound=nil local PlaybackSpeed=100
  39. local Blocks=8 local Range=10
  40. local team={}local Dat={}local dm1f=false local dm1l={}
  41. local Mode="BLOCK"
  42. local Effects=Instance.new("Folder",workspace)local PlayMode="Inverse"
  43. local function ReSound()if not Sync then if Sound then Sound:Destroy()end if oldSI~=SoundId then oldSI=SoundId Time=0 end
  44.     Sound=Instance.new("Sound")Sound.TimePosition=Time Sound:Play()Sound.Looped=true Sound.RollOffMode=PlayMode
  45.     Sound.SoundId="rbxassetid://"..tostring(SoundId)Sound.Volume=Volume Sound.EmitterSize=2500 Sound.MaxDistance=400 end
  46. end
  47. local HelpDict={"SoundId , put Sound Id to here and plays automatically.","Volume. You can control Sound volume with this. Do not input huge value! (but max is 10)"
  48. ,"(%)PlaybackSpeed. You can change pitch? with this value. Do not input HUGE value or it rips your ear!","(String)This is RollOffMode , you can use Inverse and Linear now. maybe."
  49. ,"Loud Divide value, do not input 0 please. use this if music have great volume.","Segment(s), This decides number of visualizer parts. DO NOT ABUSE THIS"
  50. ,"LoudShake ... hard to tell this and useless. visualizer shakes by loudness?","Range. This determine the range of segment parts.","(String)This can change mode , Line and Block is available."
  51. ,"DataMode : actually ded,this won't work now.(Mode 1 : something like spectrum i thought = fail)","(RGB+Opt)Color RGB. You can decide color with this textboxes!",
  52. "CFrame Rotation. It automatically rotates if values aren't 0. click Reset to clear rotate angle.","This have 0 ~ 2 and minus(rainbow) options."
  53. }HelpDict[0]="This will help you bit when you clicked something with this..."
  54. local dic_click=0
  55. local Which=true local LoudDiv=500 local something=3 local LSHAKE=0 local DataMode=1
  56. local VisC={R=255,G=255,B=255,Opt=0,RainbowSpeed=0}local Rotation={AddX=0,AddY=0,AddZ=0,X=0,Y=0,Z=0}
  57. local function Create()
  58.     dm1f=false
  59.     for i=1,#dm1l do if dm1l[i]then dm1l[i]:disconnect()end end dm1l={}
  60.     Effects:Destroy()
  61.     Effects=Instance.new("Folder",workspace)
  62.     if Mode=="BLOCK"then
  63.         team={}
  64.         for i=1,Blocks do
  65.             local p=Instance.new("Part")p.Size=Vector3.new(.1,.1,.5)p.Anchored=true p.CanCollide=false
  66.             local m=Instance.new("SpecialMesh",p)m.MeshType="Brick"m.Scale=p.Size*20 p.Size=Vector3.new()
  67.             p.Parent=Effects p.Material="Neon"
  68.             team[i]={Part=p,Mesh=m}
  69.         end
  70.         Dat={}
  71.         for i=1,Blocks do
  72.             Dat[i]=0
  73.         end
  74.     end
  75.     if Mode=="LINE"then
  76.         team={}
  77.         for i=1,Blocks do
  78.             local p=Instance.new("Part")p.Size=Vector3.new()p.Anchored=true p.CanCollide=false
  79.             local A0=Instance.new("Attachment",p)
  80.             --local tA=Instance.new("Attachment",p)tA.Position=Vector3.new(0,.05,0)local tB=Instance.new("Attachment",p)tB.Position=-tA.Position
  81.             --local tr=Instance.new("Trail",p)tr.Attachment0=tA tr.Attachment1=tB tr.FaceCamera=1 tr.Texture="rbxassetid://1251856844"tr.Transparency=NumberSequence.new(0,1)tr.LightEmission=1
  82.             --tr.Lifetime=.1
  83.             p.Parent=Effects p.Material="Neon"
  84.             team[i]={Part=p,Attr=A0,RandC=CFrame.new(),RandCD=CFrame.new()}
  85.         end
  86.         for i=1,Blocks do
  87.             local iron=Instance.new("RodConstraint",team[i].Part)
  88.             iron.Attachment0=team[i].Attr iron.Visible=true team[i].Rod=iron
  89.             local tr=Instance.new("Trail",team[i].Part)tr.Attachment0=team[i].Attr tr.Transparency=NumberSequence.new(.7,1)tr.LightEmission=1
  90.             tr.Lifetime=.2 team[i].Trail=tr
  91.             if i~=Blocks then iron.Attachment1=team[i+1].Attr tr.Attachment1=team[i+1].Attr else iron.Attachment1=team[1].Attr tr.Attachment1=team[1].Attr end
  92.         end
  93.         Dat={}
  94.         for i=1,Blocks do
  95.             Dat[i]=0
  96.         end
  97.     end
  98. end
  99. local function GUI()
  100.     local gu=Player:FindFirstChildOfClass("PlayerGui")
  101.     warn("..Spawing Gui...")
  102.     if gu then local destroy=false
  103.         if gu:FindFirstChild("tomonaoboys's audio visualizer")then gu["tomonaoboys's audio visualizer"]:Destroy()warn("Erased old gui.")end
  104.         local Screen=Instance.new("ScreenGui",gu)
  105.         Screen.Name="tomonaoboys's audio visualizer"
  106.         local Frame=Instance.new("Frame",Screen)
  107.         Frame.Size=UDim2.new(0,250,0,300)Frame.Draggable=true
  108.         Frame.Position=UDim2.new(.5,0,0,0)Frame.Active=true Frame.BackgroundTransparency=.666 Frame.BorderSizePixel=0 Frame.BackgroundColor3=Color3.new()
  109.         local TopTextLabel=Instance.new("TextLabel",Frame)TopTextLabel.Size=UDim2.new(.85,0,.05,0)TopTextLabel.Text=" tomonaoboys's audio visualizer"
  110.         TopTextLabel.BackgroundColor3=Color3.new(1,1,1)TopTextLabel.BorderSizePixel=0
  111.         TopTextLabel.BackgroundTransparency=0 TopTextLabel.TextColor3=Color3.new(1,1,1)TopTextLabel.ZIndex=256
  112.         TopTextLabel.TextStrokeTransparency=.5 TopTextLabel.LayoutOrder=256 TopTextLabel.TextXAlignment="Left"
  113.         local Musics=Instance.new("TextLabel",Frame)Musics.Size=UDim2.new(1,0,.05,0)Musics.Position=UDim2.new(0,0,.95,0)Musics.BackgroundColor3=Color3.new(1,1,1)Musics.BorderSizePixel=0
  114.         Musics.TextXAlignment="Left"Musics.TextColor3=Color3.new(1,1,1)Musics.TextStrokeTransparency=1/3
  115.         local a=Instance.new("TextButton",Frame)a.Text="Music"a.Font="Arcade"a.Position=UDim2.new(0,0,.05,0)a.Size=UDim2.new(.5,0,.05,0)a.TextSize=20 a.BorderSizePixel=0
  116.         a.TextColor3=Color3.new(1,1,1)a.TextStrokeTransparency=.5 if Which then a.BackgroundColor3=Color3.new(.4,1,.4)else a.BackgroundColor3=Color3.new(.4,.4,.4)end
  117.         a.MouseEnter:connect(function()a.BackgroundColor3=Color3.new(1,1,1)end)a.AutoButtonColor=false
  118.         a.MouseLeave:connect(function()if Which then a.BackgroundColor3=Color3.new(.4,1,.4)else a.BackgroundColor3=Color3.new(.4,.4,.4)end end)
  119.         local b=Instance.new("TextButton",Frame)b.Text="Visualizer"b.Font="Arcade"b.Position=UDim2.new(.5,0,.05,0)b.Size=UDim2.new(.5,0,.05,0)b.TextSize=20 b.BorderSizePixel=0
  120.         b.TextColor3=Color3.new(1,1,1)b.TextStrokeTransparency=.5 if not Which then b.BackgroundColor3=Color3.new(.4,1,.4)else b.BackgroundColor3=Color3.new(.4,.4,.4)end
  121.         b.MouseEnter:connect(function()b.BackgroundColor3=Color3.new(1,1,1)end)b.AutoButtonColor=false
  122.         b.MouseLeave:connect(function()if not Which then b.BackgroundColor3=Color3.new(.4,1,.4)else b.BackgroundColor3=Color3.new(.4,.4,.4)end end)
  123.         b.MouseButton1Click:connect(function()Which=false a.BackgroundColor3=Color3.new(.4,.4,.4)end)a.MouseButton1Click:connect(function()Which=true b.BackgroundColor3=Color3.new(.4,.4,.4)end)
  124.         local MusicTab=Instance.new("Frame")MusicTab.Name="MusicOpt"
  125.         local VisTab=Instance.new("Frame")VisTab.Name="VisualizerOpt"
  126.         MusicTab.Size=UDim2.new(1,0,.85,0)MusicTab.Position=UDim2.new(0,0,.1,0)MusicTab.BackgroundTransparency=1
  127.        
  128.         if 1 then
  129.         local idk=Instance.new("UIListLayout",MusicTab)idk.Padding=UDim.new(0,1)
  130.         local f=GetInstance("Frame",MusicTab)f.Size=UDim2.new(1,0,.05,0)f.BackgroundTransparency=1
  131.         local a=Instance.new("TextButton",f)a.Size=UDim2.new(.2,0,1,0)a.Text="ID"a.BorderSizePixel=0
  132.         a.TextColor3=Color3.new(1,1,1)a.TextStrokeTransparency=.5 a.TextStrokeColor3=Color3.new(.5,.5,.5)
  133.         a.BackgroundColor3=Color3.new(0,0,0)a.AutoButtonColor=nil a.MouseButton1Click:connect(function()dic_click=1 end)
  134.         local a2=Instance.new("TextBox",a.Parent)a2.Size=UDim2.new(.8,0,1,0)a2.Position=UDim2.new(.2,0,0,0)a2.TextColor3=Color3.new(0,0,0)a2.BackgroundColor3=Color3.new(1,1,1)a2.BorderSizePixel=0
  135.         if SoundId==nil then a2.Text=""else a2.Text=tostring(SoundId)end
  136.         a2.FocusLost:connect(function(i)if i then oldSI=SoundId SoundId=tonumber(a2.Text)ReSound()end end)
  137.         local f=GetInstance("Frame",MusicTab)f.Size=UDim2.new(1,0,.05,0)f.BackgroundTransparency=1
  138.         local a=Instance.new("TextButton",f)a.Size=UDim2.new(.2,0,1,0)a.Text="Volume"a.BorderSizePixel=0
  139.         a.TextColor3=Color3.new(1,1,1)a.TextStrokeTransparency=.5 a.TextStrokeColor3=Color3.new(.5,.5,.5)
  140.         a.BackgroundColor3=Color3.new(0,0,0)a.AutoButtonColor=nil a.MouseButton1Click:connect(function()dic_click=2 end)
  141.         local a2=Instance.new("TextBox",a.Parent)a2.Size=UDim2.new(.8,0,1,0)a2.Position=a.Position+UDim2.new(.2,0,0,0)a2.TextColor3=Color3.new(0,0,0)a2.BackgroundColor3=Color3.new(1,1,1)a2.BorderSizePixel=0
  142.         a2.Text=Volume
  143.         a2.FocusLost:connect(function(i)if i then Volume=tonumber(a2.Text)Sound.Volume=Volume end end)
  144.         local f=GetInstance("Frame",MusicTab)f.Size=UDim2.new(1,0,.05,0)f.BackgroundTransparency=1
  145.         local a=Instance.new("TextButton",f)a.Size=UDim2.new(.2,0,1,0)a.Text="PBSpeed"a.BorderSizePixel=0
  146.         a.TextColor3=Color3.new(1,1,1)a.TextStrokeTransparency=.5 a.TextStrokeColor3=Color3.new(.5,.5,.5)
  147.         a.BackgroundColor3=Color3.new(0,0,0)a.AutoButtonColor=nil a.MouseButton1Click:connect(function()dic_click=3 end)
  148.         local a2=Instance.new("TextBox",a.Parent)a2.Size=UDim2.new(.8,0,1,0)a2.Position=a.Position+UDim2.new(.2,0,0,0)a2.TextColor3=Color3.new(0,0,0)a2.BackgroundColor3=Color3.new(1,1,1)a2.BorderSizePixel=0
  149.         a2.Text=tostring(PlaybackSpeed).."(%)"
  150.         a2.FocusLost:connect(function(i)if i then PlaybackSpeed=tonumber(a2.Text)end end)
  151.         local f=GetInstance("Frame",MusicTab)f.Size=UDim2.new(1,0,.05,0)f.BackgroundTransparency=1
  152.         local a=Instance.new("TextButton",f)a.Size=UDim2.new(.2,0,1,0)a.Text="Mode"a.BorderSizePixel=0
  153.         a.TextColor3=Color3.new(1,1,1)a.TextStrokeTransparency=.5 a.TextStrokeColor3=Color3.new(.5,.5,.5)
  154.         a.BackgroundColor3=Color3.new(0,0,0)a.AutoButtonColor=nil a.MouseButton1Click:connect(function()dic_click=4 end)
  155.         local a2=Instance.new("TextBox",a.Parent)a2.Size=UDim2.new(.8,0,1,0)a2.Position=a.Position+UDim2.new(.2,0,0,0)a2.TextColor3=Color3.new(0,0,0)a2.BackgroundColor3=Color3.new(1,1,1)a2.BorderSizePixel=0
  156.         a2.Text=tostring(PlayMode)
  157.         a2.FocusLost:connect(function(i)if i then PlayMode=("Linear"==a2.Text or"Inverse"==a2.Text)and a2.Text or"Inverse"warn(PlayMode.."(check)")end end)
  158.         end
  159.    
  160.         if 1 then
  161.         local idk=Instance.new("UIListLayout",VisTab)idk.Padding=UDim.new(0,1)
  162.        
  163.         local f=GetInstance("Frame",VisTab)f.Size=UDim2.new(1,0,.05,0)f.BackgroundTransparency=1
  164.         local a=Instance.new("TextButton",f)a.Size=UDim2.new(.2,0,1,0)a.Text="LoudDiv"a.BorderSizePixel=0
  165.         a.TextColor3=Color3.new(1,1,1)a.TextStrokeTransparency=.5 a.TextStrokeColor3=Color3.new(.5,.5,.5)
  166.         a.BackgroundColor3=Color3.new(0,0,0)a.AutoButtonColor=nil a.MouseButton1Click:connect(function()dic_click=5 end)
  167.         local a2=Instance.new("TextBox",a.Parent)a2.Size=UDim2.new(.8,0,1,0)a2.Position=a.Position+UDim2.new(.2,0,0,0)a2.TextColor3=Color3.new(0,0,0)a2.BackgroundColor3=Color3.new(1,1,1)a2.BorderSizePixel=0
  168.         a2.Text=LoudDiv/100
  169.         a2.FocusLost:connect(function(i)if i then LoudDiv=(tonumber(a2.Text)~=nil and tonumber(a2.Text)~=0)and tonumber(a2.Text)*100 or LoudDiv end end)
  170.         local f=GetInstance("Frame",VisTab)f.Size=UDim2.new(1,0,.05,0)f.BackgroundTransparency=1
  171.         local a=Instance.new("TextButton",f)a.Size=UDim2.new(.2,0,1,0)a.Text="Segment"a.BorderSizePixel=0
  172.         a.TextColor3=Color3.new(1,1,1)a.TextStrokeTransparency=.5 a.TextStrokeColor3=Color3.new(.5,.5,.5)
  173.         a.BackgroundColor3=Color3.new(0,0,0)a.AutoButtonColor=nil a.MouseButton1Click:connect(function()dic_click=6 end)
  174.         local a2=Instance.new("TextBox",a.Parent)a2.Size=UDim2.new(.8,0,1,0)a2.Position=a.Position+UDim2.new(.2,0,0,0)a2.TextColor3=Color3.new(0,0,0)a2.BackgroundColor3=Color3.new(1,1,1)a2.BorderSizePixel=0
  175.         a2.Text=Blocks
  176.         a2.FocusLost:connect(function(i)if i then Blocks=tonumber(a2.Text)Effects:Destroy()Create()end end)
  177.         local f=GetInstance("Frame",VisTab)f.Size=UDim2.new(1,0,.05,0)f.BackgroundTransparency=1
  178.         local a=Instance.new("TextButton",f)a.Size=UDim2.new(.2,0,1,0)a.Text="L.Shake"a.BorderSizePixel=0
  179.         a.TextColor3=Color3.new(1,1,1)a.TextStrokeTransparency=.5 a.TextStrokeColor3=Color3.new(.5,.5,.5)
  180.         a.BackgroundColor3=Color3.new(0,0,0)a.AutoButtonColor=nil a.MouseButton1Click:connect(function()dic_click=7 end)
  181.         local a2=Instance.new("TextBox",a.Parent)a2.Size=UDim2.new(.8,0,1,0)a2.Position=a.Position+UDim2.new(.2,0,0,0)a2.TextColor3=Color3.new(0,0,0)a2.BackgroundColor3=Color3.new(1,1,1)a2.BorderSizePixel=0
  182.         a2.Text=LSHAKE
  183.         a2.FocusLost:connect(function(i)if i then LSHAKE=tonumber(a2.Text)end end)
  184.         local f=GetInstance("Frame",VisTab)f.Size=UDim2.new(1,0,.05,0)f.BackgroundTransparency=1
  185.         local a=Instance.new("TextButton",f)a.Size=UDim2.new(.2,0,1,0)a.Text="Range"a.BorderSizePixel=0
  186.         a.TextColor3=Color3.new(1,1,1)a.TextStrokeTransparency=.5 a.TextStrokeColor3=Color3.new(.5,.5,.5)
  187.         a.BackgroundColor3=Color3.new(0,0,0)a.AutoButtonColor=nil a.MouseButton1Click:connect(function()dic_click=8 end)
  188.         local a2=Instance.new("TextBox",a.Parent)a2.Size=UDim2.new(.8,0,1,0)a2.Position=a.Position+UDim2.new(.2,0,0,0)a2.TextColor3=Color3.new(0,0,0)a2.BackgroundColor3=Color3.new(1,1,1)a2.BorderSizePixel=0
  189.         a2.Text=Range
  190.         a2.FocusLost:connect(function(i)if i then Range=tonumber(a2.Text)end end)
  191.         local f=GetInstance("Frame",VisTab)f.Size=UDim2.new(1,0,.05,0)f.BackgroundTransparency=1
  192.         local a=Instance.new("TextButton",f)a.Size=UDim2.new(.2,0,1,0)a.Text="Mode"a.BorderSizePixel=0
  193.         a.TextColor3=Color3.new(1,1,1)a.TextStrokeTransparency=.5 a.TextStrokeColor3=Color3.new(.5,.5,.5)
  194.         a.BackgroundColor3=Color3.new(0,0,0)a.AutoButtonColor=nil a.MouseButton1Click:connect(function()dic_click=9 end)
  195.         local a2=Instance.new("TextBox",a.Parent)a2.Size=UDim2.new(.8,0,1,0)a2.Position=a.Position+UDim2.new(.2,0,0,0)a2.TextColor3=Color3.new(0,0,0)a2.BackgroundColor3=Color3.new(1,1,1)a2.BorderSizePixel=0
  196.         a2.Text=Mode
  197.         a2.FocusLost:connect(function(i)local t=a2.Text:upper()if(t=="BLOCK")or(t=="LINE")then Mode=t Create()end end)
  198.         local f=GetInstance("Frame",VisTab)f.Size=UDim2.new(1,0,.05,0)f.BackgroundTransparency=1
  199.         local a=Instance.new("TextButton",f)a.Size=UDim2.new(.2,0,1,0)a.Text="DatMode"a.BorderSizePixel=0
  200.         a.TextColor3=Color3.new(1,1,1)a.TextStrokeTransparency=.5 a.TextStrokeColor3=Color3.new(.5,.5,.5)
  201.         a.BackgroundColor3=Color3.new(0,0,0)a.AutoButtonColor=nil a.MouseButton1Click:connect(function()dic_click=10 end)
  202.         local a2=Instance.new("TextBox",a.Parent)a2.Size=UDim2.new(.8,0,1,0)a2.Position=a.Position+UDim2.new(.2,0,0,0)a2.TextColor3=Color3.new(0,0,0)a2.BackgroundColor3=Color3.new(1,1,1)a2.BorderSizePixel=0
  203.         a2.Text=DataMode.." / Warning : don't work"
  204.         a2.FocusLost:connect(function(i)local t=tonumber(a2.Text)if(t==0)or(t==1)then DataMode=t Create()end end)
  205.         local f=GetInstance("Frame",VisTab)f.Size=UDim2.new(1,0,.05,0)f.BackgroundTransparency=1
  206.         local a=Instance.new("TextButton",f)a.Size=UDim2.new(.2,0,1,0)a.Text="ColRGB"a.BorderSizePixel=0
  207.         a.TextColor3=Color3.new(1,1,1)a.TextStrokeTransparency=.5 a.TextStrokeColor3=Color3.new(.5,.5,.5)
  208.         a.BackgroundColor3=Color3.new(0,0,0)a.AutoButtonColor=nil a.MouseButton1Click:connect(function()dic_click=11 end)
  209.         local a2=Instance.new("TextBox",a.Parent)a2.Size=UDim2.new(.8/4,0,1,0)a2.Position=a.Position+UDim2.new(.2,0,0,0)a2.TextColor3=Color3.new(0,0,0)a2.BackgroundColor3=Color3.new(1,.5,.5)a2.BorderSizePixel=0
  210.         a2.Text=VisC.R
  211.         a2.FocusLost:connect(function(i)VisC.R=tonumber(a2.Text)or VisC.R end)
  212.         local a2=Instance.new("TextBox",a.Parent)a2.Size=UDim2.new(.8/4,0,1,0)a2.Position=a.Position+UDim2.new(.2+.8/4,0,0,0)a2.TextColor3=Color3.new(0,0,0)a2.BackgroundColor3=Color3.new(.5,1,.5)a2.BorderSizePixel=0
  213.         a2.Text=VisC.G
  214.         a2.FocusLost:connect(function(i)VisC.G=tonumber(a2.Text)or VisC.G end)
  215.         local a2=Instance.new("TextBox",a.Parent)a2.Size=UDim2.new(.8/4,0,1,0)a2.Position=a.Position+UDim2.new(.2+.8/4*2,0,0,0)a2.TextColor3=Color3.new(0,0,0)a2.BackgroundColor3=Color3.new(.5,.5,1)a2.BorderSizePixel=0
  216.         a2.Text=VisC.B
  217.         a2.FocusLost:connect(function(i)VisC.B=tonumber(a2.Text)or VisC.B end)
  218.         local a2=Instance.new("TextBox",a.Parent)a2.Size=UDim2.new(.8/4,0,1,0)a2.Position=a.Position+UDim2.new(.2+.8/4*3,0,0,0)a2.TextColor3=Color3.new(0,0,0)a2.BackgroundColor3=Color3.new(1,1,1)a2.BorderSizePixel=0
  219.         a2.Text="(Option)"..VisC.Opt a2.InputBegan:connect(function()dic_click=13 end)
  220.         a2.FocusLost:connect(function(i)local wasRainbow=VisC.Opt<0 and 1 or nil  VisC.Opt=tonumber(a2.Text)or VisC.Opt
  221.         if VisC.Opt<0 then VisC.RainbowSpeed=math.abs(VisC.Opt)VisC.R,VisC.G,VisC.B=255,0,0 else if wasRainbow then VisC.R,VisC.G,VisC.B=255,255,255 end end
  222.         print(VisC.Opt<0 and"Rainbow"or VisC.Opt==0 and"Lower Color by Loudness"or VisC.Opt==1 and"One Color"or VisC.Opt==2 and"Fading by Loudness")
  223.         end)
  224.         local f=GetInstance("Frame",VisTab)f.Size=UDim2.new(1,0,.05,0)f.BackgroundTransparency=1
  225.         local a=Instance.new("TextButton",f)a.Size=UDim2.new(.2,0,1,0)a.Text="C.Rotate"a.BorderSizePixel=0
  226.         a.TextColor3=Color3.new(1,1,1)a.TextStrokeTransparency=.5 a.TextStrokeColor3=Color3.new(.5,.5,.5)
  227.         a.BackgroundColor3=Color3.new(0,0,0)a.AutoButtonColor=nil a.MouseButton1Click:connect(function()dic_click=12 end)
  228.         local a2=Instance.new("TextBox",a.Parent)a2.Size=UDim2.new(.8/4,0,1,0)a2.Position=a.Position+UDim2.new(.2,0,0,0)a2.TextColor3=Color3.new(0,0,0)a2.BackgroundColor3=Color3.new(1,.5,.5)a2.BorderSizePixel=0
  229.         a2.Text="X="..Rotation.AddX
  230.         a2.FocusLost:connect(function(i)Rotation.AddX=tonumber(a2.Text)or Rotation.AddX end)
  231.         local a2=Instance.new("TextBox",a.Parent)a2.Size=UDim2.new(.8/4,0,1,0)a2.Position=a.Position+UDim2.new(.2+.8/4,0,0,0)a2.TextColor3=Color3.new(0,0,0)a2.BackgroundColor3=Color3.new(.5,1,.5)a2.BorderSizePixel=0
  232.         a2.Text="Y="..Rotation.AddY
  233.         a2.FocusLost:connect(function(i)Rotation.AddY=tonumber(a2.Text)or Rotation.AddY end)
  234.         local a2=Instance.new("TextBox",a.Parent)a2.Size=UDim2.new(.8/4,0,1,0)a2.Position=a.Position+UDim2.new(.2+.8/4*2,0,0,0)a2.TextColor3=Color3.new(0,0,0)a2.BackgroundColor3=Color3.new(.5,.5,1)a2.BorderSizePixel=0
  235.         a2.Text="Z="..Rotation.AddZ
  236.         a2.FocusLost:connect(function(i)Rotation.AddZ=tonumber(a2.Text)or Rotation.AddZ end)
  237.         local a2=Instance.new("TextButton",a.Parent)a2.Size=UDim2.new(.8/4,0,1,0)a2.Position=a.Position+UDim2.new(.2+.8/4*3,0,0,0)a2.TextColor3=Color3.new(0,0,0)a2.BackgroundColor3=Color3.new(.4,.4,.4)a2.BorderSizePixel=0
  238.         a2.Text="Reset"
  239.         a2.MouseButton1Click:connect(function()Rotation.X=0 Rotation.Y=0 Rotation.Z=0 end)
  240.         end
  241.        
  242.         VisTab.Size=UDim2.new(1,0,.85,0)VisTab.Position=UDim2.new(0,0,.1,0)VisTab.BackgroundTransparency=1
  243.        
  244.         spawn(function()
  245.             while sw()and not destroy and gu.Parent do
  246.                 if not destroy and gu.Parent then
  247.                 if SoundId~=nil then
  248.                     Musics.Text="Playing: "..game:GetService("MarketplaceService"):GetProductInfo(SoundId).Name
  249.                 else
  250.                     Musics.Text="Playing: < None >"
  251.                 end
  252.                 if Sound then Musics.BackgroundColor3=Color3.new(Sound.PlaybackLoudness/LoudDiv,Sound.PlaybackLoudness/LoudDiv,Sound.PlaybackLoudness/LoudDiv)end
  253.                 if Which then
  254.                     MusicTab.Parent=Frame
  255.                     VisTab.Parent=nil
  256.                 else
  257.                     MusicTab.Parent=nil
  258.                     VisTab.Parent=Frame
  259.                 end
  260.                 end
  261.             end
  262.         end)
  263.         local HelpLabel=Instance.new("TextButton",Screen)HelpLabel.BackgroundTransparency=.3 HelpLabel.TextColor3=Color3.new(1,1,1)HelpLabel.AutoButtonColor=nil
  264.         HelpLabel.BackgroundColor3=Color3.new()HelpLabel.BorderSizePixel=0 HelpLabel.ZIndex=256 HelpLabel.TextStrokeTransparency=0
  265.         HelpLabel.TextXAlignment="Left"
  266.         spawn(function()
  267.         while sw()and not destroy and gu.Parent do
  268.             if Alt then
  269.                 HelpLabel.Text="  "..tostring(HelpDict[dic_click]or "Wait... It has no info.")
  270.                 HelpLabel.Size=UDim2.new(0,5,.025,0)HelpLabel.Position=UDim2.new(0,Mouse.X+20,0,Mouse.Y+20)
  271.             else
  272.                 HelpLabel.Size=UDim2.new(0,0,0,0)HelpLabel.Text=""
  273.             end
  274.         end
  275.         end)
  276.         local CloseButton=Instance.new("TextButton",Frame)CloseButton.Size=UDim2.new(.149,0,.05,0)CloseButton.Text="Close"CloseButton.BorderSizePixel=0
  277.         CloseButton.Position=UDim2.new(.85,0,0,0)CloseButton.BackgroundColor3=Color3.new(1,.4,.4)CloseButton.TextColor3=Color3.new(1,1,1)CloseButton.TextStrokeTransparency=.5
  278.         CloseButton.MouseButton1Down:connect(function()destroy=true sw()Screen:Destroy()end)CloseButton.ZIndex=256
  279.     else
  280.         error("PlayerGui not found. This error is very bad, I recommend you to rejoin.")
  281.     end
  282. end
  283. GUI()
  284. Player.Chatted:connect(function(m)
  285. m=string.upper(m)
  286. if m:sub(1,6)=="A:SET:"then SyncTo=tonumber(m:sub(7))or 1 warn('Set to '..tostring(SyncTo))end
  287. if m=="A:GUI"then GUI()end
  288. if m=="A:SYNC"then if SyncData[1]~=nil then Sync=not Sync Sound=nil else warn'not found'end warn(Sync) end
  289. if m=="A:SY:GET"then local c=0
  290. for i,p in pairs(workspace:GetDescendants())do
  291. if p:IsA'Sound'and p.TimeLength>20 then table.insert(SyncData,p)c=c+1 print(tostring(c)..":"..tostring(p:GetFullName()))end
  292. end
  293. end
  294.  
  295. end)
  296. Create()Tweens={}
  297. local function quadOut(t,b,c,d)t=t/d return -c*t*(t-2)+b end
  298. local function quadIn(t,b,c,d)t=t/d return c*t*t+b end
  299. local function Quad(did,val,ease,d)--local Height=LoudDiv
  300.     local t,f,con,nt,st,sd=tick()
  301.     Tweens[did]=t -- Set identifier
  302.     st=did--.Scale.Y -- Start Value
  303.     sd=val-st -- Change in Value
  304.     f=ease=='In' and quadIn or quadOut -- Choose between Out/In
  305.     con=game:GetService'RunService'.RenderStepped:connect(function() nt=tick()-t
  306.         if Tweens[did]~=t or DataMode~=1 then -- Check for override
  307.             con:disconnect()
  308.             return
  309.         end
  310.         local nv=math.max(.2,f(math.min(d,nt),st,sd,d)) -- New Value
  311.         Dat[did]=nv*255/LoudDiv
  312.         if nt>d then -- Easing done?
  313.             con:disconnect()
  314.             if ease~='In' then
  315.                 Quad(did,.2,'Out',.05) -- Drop the bar
  316.             end
  317.         end
  318.     end)
  319. end
  320.  
  321. local function CheckSet(N,S,D) -- Number, Scale, Direction
  322.     local nS=Dat[N]--Soundbar[tostring(N)].Mesh.Scale.Y
  323.     if nS~=nil and S>nS then
  324.         Set(N,nS+(S-nS)/3,D)
  325.     end
  326. end
  327. function Set(N,S,D) -- Number, Scale, Direction
  328.     Quad(N,S,'Out',.1) -- Grabs the bar and tweens
  329.     if N>0 and D~=1 then -- Checks left for smaller bars to manipulate
  330.         CheckSet(N-1,S,-1)
  331.     end
  332.     if N<#team-1 and D~=-1 then -- Checks right...
  333.         CheckSet(N+1,S,1)
  334.     end
  335. end
  336.  
  337. RandSeed=math.random(65546)
  338. local function quadOut(t,b,c,d)t=t/d return -c*t*(t-2)+b end
  339. local oldt=tick()local Ra_Flg=0 PL=0 MPL=0
  340. RS:connect(function()
  341.     if VisC.Opt<0 then
  342.     if VisC.R>=255 then Ra_Flg=1 end
  343.     if VisC.G>=255 then Ra_Flg=2 end
  344.     if VisC.B>=255 then Ra_Flg=3 end
  345.     if Ra_Flg==1 then VisC.R=VisC.R-VisC.RainbowSpeed VisC.G=VisC.G+VisC.RainbowSpeed VisC.B=0 end
  346.     if Ra_Flg==2 then VisC.G=VisC.G-VisC.RainbowSpeed VisC.B=VisC.B+VisC.RainbowSpeed VisC.R=0 end
  347.     if Ra_Flg==3 then VisC.B=VisC.B-VisC.RainbowSpeed VisC.R=VisC.R+VisC.RainbowSpeed VisC.G=0 end
  348.     else
  349.     VisC.RainbowSpeed=0 Ra_Flg=0
  350.     end
  351.     Rotation.X,Rotation.Y,Rotation.Z=Rotation.X+Rotation.AddX/360,Rotation.Y+Rotation.AddY/360,Rotation.Z+Rotation.AddZ/360
  352.     if Effects.Parent==nil then Effects=Instance.new("Folder",workspace)Create()end
  353.     if not Sync then
  354.     if Sound==nil then
  355.         ReSound()
  356.     elseif Sound.Parent==nil then
  357.         ReSound()
  358.     end
  359.     if not Sound.Playing then Sound:Play()end
  360.    
  361.     Time=Sound.TimePosition local t=tick()
  362.     Sound.PlaybackSpeed=PlaybackSpeed/100
  363.     Sound.RollOffMode=PlayMode-- print(t-oldt)
  364.     else
  365.     Sound=SyncData[SyncTo]
  366.     end
  367.    
  368.     if Player.Character then
  369.         if Player.Character:FindFirstChild("HumanoidRootPart")and Player.Character~=nil then
  370.             if not Sync then Sound.Parent=Player.Character.HumanoidRootPart end
  371.             Position=Position:Lerp(Player.Character.HumanoidRootPart.Position,.1)
  372.         else
  373.             if not Sync then Sound.Parent=Player end
  374.         end
  375.     else
  376.         if not Sync then Sound.Parent=Player end
  377.     end
  378.    
  379.     if DataMode==0 then table.insert(Dat,1,Sound.PlaybackLoudness/LoudDiv*255)end
  380.     PL=Sound.PlaybackLoudness MPL=math.max(PL,MPL)PL=PL/MPL
  381.     if DataMode==1 then
  382.         for i=1,#team do if PL==PL then
  383.                 Set(math.floor(PL*#team-1),PL*LoudDiv) -- Modify bar relative to PlaybackLoudness
  384.             end
  385.         end
  386.     end
  387.    
  388.     oldt=t
  389.     if Dat[2]then if math.abs(Dat[1]-Dat[2])>LoudDiv/16 then RandSeed=math.random(65546)end end
  390.     if Mode=="BLOCK"then--block start
  391.     local randidk=CFrame.new(math.random(-Sound.PlaybackLoudness,Sound.PlaybackLoudness)/LoudDiv*LSHAKE,math.random(-Sound.PlaybackLoudness,Sound.PlaybackLoudness)/LoudDiv*LSHAKE,math.random(-Sound.PlaybackLoudness,Sound.PlaybackLoudness)/LoudDiv*LSHAKE)
  392.     randidk=randidk*CFrame.Angles(math.random(-Sound.PlaybackLoudness,Sound.PlaybackLoudness)/LoudDiv*LSHAKE/3,math.random(-Sound.PlaybackLoudness,Sound.PlaybackLoudness)/LoudDiv*LSHAKE/3,math.random(-Sound.PlaybackLoudness,Sound.PlaybackLoudness)/LoudDiv*LSHAKE/3)
  393.     for i=1,#team do
  394.         if team[i].Part then
  395.             if team[i].Part.Parent then
  396.                 team[i].Part.CFrame=CFrame.new(Position)*CFrame.Angles(Rotation.X,Rotation.Y,Rotation.Z)*randidk*CFrame.Angles(0,math.rad(i/#team*360),0)--*CFrame.new(0,0,Range+Dat[i]/40)
  397.                 team[i].Mesh.Scale=Vector3.new(5,5,20+Dat[i])
  398.                 team[i].Mesh.Offset=Vector3.new(0,0,Range+Dat[i]/40)
  399.                 if VisC.Opt==0 then
  400.                 team[i].Part.Color=Color3.new(Dat[i]/255*(VisC.R/255),Dat[i]/255*(VisC.G/255),Dat[i]/255*(VisC.B/255))
  401.                 else--if VisC.Opt==1 or VisC.Opt==2 then
  402.                 team[i].Part.Color=Color3.fromRGB(VisC.R,VisC.G,VisC.B)
  403.                 team[i].Part.Transparency=(VisC.Opt==2 and 1-Dat[i]/255)or 0
  404.                 end
  405.             end
  406.         end
  407.     end--block end
  408.     elseif Mode=="LINE"then--line start
  409.     local idk=CFrame.new()if 1 then math.randomseed(RandSeed)
  410.     for i=1,#team do team[i].RandCD=CFrame.Angles(math.rad(math.random(360)),math.rad(math.random(360)),0)*CFrame.new(0,0,math.random(100)/100)end
  411.     end
  412.     for i=1,#team do
  413.         if team[i].Part then
  414.             if team[i].Part.Parent then
  415.                 team[i].RandC=team[i].RandC:lerp(team[i].RandCD,.2)
  416.                 team[i].Part.CFrame=CFrame.new(Position)*CFrame.Angles(Rotation.X,Rotation.Y,Rotation.Z)*CFrame.Angles(0,math.rad(i/#team*360),0)*CFrame.new(0,0,Range)*team[i].RandC*CFrame.new(0,0,Dat[i]/40)
  417.                 if VisC.Opt==0 then
  418.                 team[i].Part.Color=Color3.new(Dat[i]/255*(VisC.R/255),Dat[i]/255*(VisC.G/255),Dat[i]/255*(VisC.B/255))team[i].Rod.Color=BrickColor.new(Dat[i]/255*(VisC.R/255),Dat[i]/255*(VisC.G/255),Dat[i]/255*(VisC.B/255))
  419.                 team[i].Trail.Color=ColorSequence.new(Color3.new(Dat[i]/255*(VisC.R/255),Dat[i]/255*(VisC.G/255),Dat[i]/255*(VisC.B/255)))
  420.                 else--if VisC.Opt==1 or VisC.Opt==2 then
  421.                 team[i].Part.Color=Color3.fromRGB(VisC.R,VisC.G,VisC.B)
  422.                 team[i].Rod.Color=BrickColor.new(Color3.fromRGB(VisC.R,VisC.G,VisC.B))
  423.                 team[i].Trail.Color=ColorSequence.new(Color3.fromRGB(VisC.R,VisC.G,VisC.B))
  424.                 end
  425.             end
  426.         end
  427.     end--line end
  428.     end
  429. end)
Add Comment
Please, Sign In to add comment