Advertisement
Guest User

Untitled

a guest
Nov 27th, 2017
835
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.90 KB | None | 0 0
  1. -- // SaVio Visualizer
  2.  
  3. script.Name = 'Fat'
  4. local Player = game:GetService('Players').LocalPlayer --// asd
  5. repeat wait() until Player.Character ~= nil
  6. local Character = Player.Character
  7.  
  8. local Root = Character:WaitForChild('HumanoidRootPart') --// r15 support mk
  9. local Audio = 686574675 --657230380 --337053183 --652857160
  10. local Market = game:service'MarketplaceService'
  11. local Data = Market:GetProductInfo(Audio)
  12. local Sine, Change = 0, 1
  13. local Rbx = 'rbxassetid://'
  14.  
  15. local Sound = Instance.new('Sound')
  16. Sound.SoundId = Rbx..Audio
  17. --Sound.Pitch = .65
  18. Sound.Volume = 10
  19.  
  20. local Functions = {};
  21. local ScriptsSent = {};
  22. local Assets = {};
  23.  
  24. local RenderStepped = game:GetService'RunService'.RenderStepped
  25. local Stepped = game:GetService'RunService'.Stepped
  26.  
  27. function Functions:ReSurface(Part, Integer)
  28. if Part ~= nil and Part:IsA'BasePart' then
  29. Part.TopSurface = Integer
  30. Part.BottomSurface = Integer
  31. Part.LeftSurface = Integer
  32. Part.RightSurface = Integer
  33. Part.FrontSurface = Integer
  34. Part.BackSurface = Integer
  35. end
  36. end
  37.  
  38. ArtificialHB = Instance.new("BindableEvent", script)
  39. ArtificialHB.Name = "Heartbeat"
  40.  
  41. script:WaitForChild("Heartbeat")
  42.  
  43. delay_per_second = 35
  44. frame = 1 / delay_per_second
  45. tf = 0
  46. allowframeloss = false
  47. tossremainder = false
  48. lastframe = tick()
  49. script.Heartbeat:Fire()
  50.  
  51. game:GetService("RunService").Heartbeat:connect(function(s, p)
  52. tf = tf + s
  53. if tf >= frame then
  54. if allowframeloss then
  55. script.Heartbeat:Fire()
  56. lastframe = tick()
  57. else
  58. for i = 1, math.floor(tf / frame) do
  59. script.Heartbeat:Fire()
  60. end
  61. lastframe = tick()
  62. end
  63. if tossremainder then
  64. tf = 0
  65. else
  66. tf = tf - frame * math.floor(tf / frame)
  67. end
  68. end
  69. end)
  70.  
  71. function swait(num)
  72. if num == 0 or num == nil then
  73. return ArtificialHB.Event:wait()
  74. else
  75. for i = 0, num do
  76. ArtificialHB.Event:wait()
  77. end
  78. end
  79. end
  80.  
  81. function Functions:ni(name,prnt)
  82. return Instance.new(tostring(name),prnt)
  83. end
  84.  
  85. function Functions:CLerp(c1,c2,al)
  86. local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()}
  87. local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()}
  88. for i,v in pairs(com1) do
  89. com1[i] = v+(com2[i]-v)*al
  90. end
  91. return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1)))--]]
  92. end
  93.  
  94. function Functions:Lerp(c1,c2,al)
  95. return c1:lerp(c2, al)
  96. end
  97.  
  98. function Functions:NewObject(Type, Parent, Others)
  99. if not Parent then
  100. Parent = workspace
  101. end
  102. local New = Functions:ni(Type)
  103. if New:IsA'BasePart' then
  104. Functions:ReSurface(New,10)
  105. New.Anchored = true
  106. New.Size = Vector3.new(1,1,1)
  107. New.CanCollide = false
  108. New.Locked = true
  109. end
  110. for i,v in next, Others do
  111. local suc,err = pcall(function()
  112. New[i] = v
  113. end)
  114. if not suc then
  115. print(err)
  116. end
  117. end
  118. New.Parent = Parent
  119. return New
  120. end
  121. --184415363
  122. function Functions:Rainbow(Hue)
  123. local section = Hue % 1 * 3
  124. local secondary = 0.5 * math.pi * (section % 1)
  125. if section < 1 then
  126. return Color3.new(1, 1 - math.cos(secondary), 1 - math.sin(secondary))
  127. elseif section < 2 then
  128. return Color3.new(1 - math.sin(secondary), 1, 1 - math.cos(secondary))
  129. else
  130. return Color3.new(1 - math.cos(secondary), 1 - math.sin(secondary), 1)
  131. end
  132. end
  133.  
  134. local CurSong = ''
  135. function Functions:MakeVisualizer()
  136. local Rainbow = Functions:Rainbow(tick()/4)
  137. Assets = {};
  138. local Main = Functions:NewObject('Part', workspace, {
  139. Transparency = 0,
  140. Material = 'Neon',
  141. Size = Vector3.new(18,12,.2),
  142. CFrame = Root.CFrame * CFrame.new(0,1,-5) * CFrame.Angles(-math.rad(5),0,0),
  143. Color = Color3.new(0,0,0),
  144. });
  145. Sound.Parent = Main
  146. Sound.Volume = 10
  147. Sound:Play()
  148. local MainSurface = Functions:NewObject('SurfaceGui', Main,{Face = 'Back'});
  149. local Light = Functions:NewObject('SurfaceLight',Main,{
  150. Face = 'Back',
  151. Shadows = true,
  152. Color = Color3.new(.5,.5,.5),
  153. Brightness = 3,
  154. });
  155. local MainFrame = Functions:NewObject('Frame', MainSurface,{
  156. Size = UDim2.new(1,0,1,0),
  157. Position = UDim2.new(0,0,0),
  158. BackgroundTransparency=1,
  159. ClipsDescendants=true,
  160. BorderSizePixel = 0,
  161. ZIndex = 1
  162. });
  163. local fps = 0
  164. local link = ('https://www.roblox.com/library/%d/%s'):format(Data.AssetId,Data.Name)
  165. local Link = Functions:NewObject('TextLabel', MainFrame,{
  166. Size = UDim2.new(1,0,.1,0),
  167. BackgroundTransparency=1,
  168. BorderSizePixel = 0,
  169. ZIndex = 10,
  170. TextSize = 17,
  171. Font = 'SourceSans',
  172. TextColor3 = Color3.new(0,0,0),
  173. Text = link,
  174. });
  175. local Uploader = Functions:NewObject('TextLabel', MainFrame,{
  176. Size = UDim2.new(1,0,.1,-30),
  177. BackgroundTransparency=1,
  178. BorderSizePixel = 0,
  179. ZIndex = 10,
  180. TextSize = 15,
  181. Font = 'SourceSansBold',
  182. TextColor3 = Color3.new(0,0,0),
  183. Text = Data.Creator.Name,
  184. });
  185. local Info = Functions:NewObject('TextLabel', MainFrame,{
  186. Size = UDim2.new(1,0,1,0),
  187. BackgroundTransparency=1,
  188. BorderSizePixel = 0,
  189. ZIndex = 10,
  190. TextSize = 25,
  191. Font = 'SourceSansBold',
  192. TextColor3 = Color3.new(1,1,1),
  193. Text = 'loading...',
  194. });
  195. local Shader = 54888284
  196. local Background = 305407040
  197. local Gradient = 156579757 --154741878
  198. local Max, Up = 1,.025
  199. local Labels = {};
  200. local index = 0
  201. function lnum(a, b, c)
  202. return a + (b - a) * c;
  203. end;
  204. local BallId = 284205403 --502107146 --78066936
  205. local BallImg = Functions:NewObject('ImageLabel', MainFrame,{
  206. Position = UDim2.new(.5,-225,.5,-200),
  207. Size = UDim2.new(0,450,0,400),
  208. BackgroundTransparency=1,
  209. BorderSizePixel = 0,
  210. Rotation = 25,
  211. ImageColor3 = Color3.new(0,0,0),
  212. Image = Rbx..BallId,
  213. ZIndex = 4,
  214. });
  215. local Bg = Functions:NewObject('ImageLabel', MainFrame, {
  216. Size = UDim2.new(1,0,1,0),
  217. BackgroundTransparency=1,
  218. BorderSizePixel = 0,
  219. ImageTransparency = .05,
  220. Image = Rbx..Background,
  221. ZIndex = 1,
  222. });
  223. local Shade = Functions:NewObject('ImageLabel', MainFrame, {
  224. Size = UDim2.new(1,0,1,0),
  225. BackgroundTransparency=1,
  226. BorderSizePixel = 0,
  227. ImageTransparency = 0,
  228. Image = Rbx..Gradient,
  229. ZIndex = 10,
  230. });
  231. for i = 0,Max,Up do
  232. index=index+1
  233. local Label = Functions:NewObject('ImageLabel', MainFrame,{
  234. Position = UDim2.new(i,0,1,-10),
  235. Size = UDim2.new(Up/1.1,0,0,10),
  236. BackgroundTransparency=1,
  237. BorderSizePixel = 0,
  238. ImageColor3 = Color3.new(0,0,0),
  239. Image = Rbx..Gradient,
  240. ZIndex = 2,
  241. });
  242. table.insert(Labels,{Ui=Label,SScale = Label.Size.X.Scale, PScale = Label.Position.X.Scale,Total=Label.Size})
  243. end
  244. local Speed = 3
  245. spawn(function()
  246. while true do
  247. swait(8)
  248. local Spec = Functions:NewObject('ImageLabel', MainFrame,{
  249. Size = UDim2.new(0,1,0,1),
  250. Position = UDim2.new(.5,-6.5,.5,-6),
  251. BackgroundTransparency=1,
  252. BorderSizePixel = 0,
  253. Image = Rbx..284205403,
  254. ImageColor3 = Color3.new(0,0,0),
  255. ZIndex = 1,
  256. });
  257. spawn(function()
  258. Spec:TweenSize(UDim2.new(0,155,0,150),'Out','Linear',3,true)
  259. local mxd = 500
  260. local x,y=math.random(-mxd,mxd),math.random(-mxd/1.5,mxd/1.5)
  261. Spec.Position = UDim2.new(.5,x-(52.5),.5,y-(50))
  262. for i = 0,1,.025 do
  263. Spec.ImageTransparency = lnum(Spec.ImageTransparency, i, .5)
  264. Spec:TweenPosition(UDim2.new(.5,x,.5,y-(100)),'Out','Linear',Speed,true)
  265. RenderStepped:wait()
  266. end
  267. Spec:Destroy()
  268. end)
  269. end
  270. end)
  271. local function formatminutes(num)
  272. local ret = 'error; 0:00'
  273. if num < 60 then
  274. if num < 10 then
  275. ret = '0:0'..num
  276. else
  277. ret = '0:'..num
  278. end
  279. elseif num >= 60 then
  280. local i = 0
  281. local count = num/60
  282. local total = num
  283. for int = 0,count do
  284. local alg = count * int
  285. for int2 = 1,59 do
  286. if tonumber(tostring(alg):sub(1,1))==int2 then
  287. i=i+1
  288. total=total-60
  289. end
  290. end
  291. end
  292. if total < 0 then
  293. total = 0
  294. end
  295. if total < 10 then
  296. total = '0'..total
  297. end
  298. ret = i..':'..total
  299. end
  300. return ret
  301. end
  302. local Loudness = 0
  303. Sound.Looped = true
  304. local Style = 'Back'
  305. local Olds = {};
  306. local LastL = 0
  307. Sound.Pitch = 1
  308. wait(1)
  309. --table.foreach(Data.Creator,print)
  310. while true do
  311. link = ('https://www.roblox.com/library/%d/%s'):format(Data.AssetId,Data.Name)
  312. Link.Text = link
  313. fps = 1/tf
  314. Loudness = Sound.PlaybackLoudness
  315. local boom = false
  316. if LastL + 200 < Loudness then
  317. boom = true
  318. print'boom hoe'
  319. end
  320. LastL = Loudness
  321. if Loudness > MainFrame.AbsoluteSize.Y - 100 then
  322. Loudness = MainFrame.AbsoluteSize.Y - 100
  323. end
  324. if #Olds > 5e4 then
  325. Olds = {};
  326. end
  327. table.insert(Olds, Loudness)
  328. local top = 0
  329. for i,v in next, Olds do
  330. top = top + v
  331. end
  332. Uploader.Text = Data.Creator.Name..' • '..Data.Creator.Id
  333. local Avg = top / (100+Loudness)
  334. Info.Text = formatminutes(math.floor(Sound.TimePosition))..' • '..formatminutes(math.floor(Sound.TimeLength))
  335. --Info.Text = 'Average Loudness: '..math.floor(Avg)..'\nTitle: '..Data.Name..'\nRefresh Rate: '..math.floor(fps*2)..' / ps'
  336. swait(0)
  337. Main.CFrame = Functions:Lerp(Main.CFrame, Root.CFrame * CFrame.new(0,3,-10) * CFrame.Angles(-math.rad(7.5),0,0), .15)
  338. local Max = Labels[1]
  339.  
  340. local Speed, Default = .5, 10
  341. Max.Ui:TweenSizeAndPosition(UDim2.new(Max.SScale,0,0,-10-Loudness),UDim2.new(Max.PScale,0,1,0),'Out',Style,Speed,true)
  342. local MxAlg = (255/(MainFrame.AbsoluteSize.Y - Max.Ui.Size.Y.Offset))
  343. local MxClr = Color3.new(MxAlg,0,MxAlg)
  344. --Max.Ui.ImageColor3 = Functions:Lerp(Max.Ui.ImageColor3, MxClr, .2)
  345. local TAlg = Sound.PlaybackLoudness/1.5
  346. local Trans = ((1/TAlg)*6)
  347. if TAlg < 1 then
  348. Trans = 1
  349. end
  350. local Rng = (8/Trans)
  351. Light.Range = lnum(Light.Range, Rng/2, .2)
  352. Shade.ImageTransparency = lnum(Shade.ImageTransparency, 1-(Trans/2) ,.1)
  353. BallImg:TweenSizeAndPosition(UDim2.new(0,250+TAlg,0,200+TAlg), UDim2.new(.5,-125-(TAlg/2),.5,-100-(TAlg/2)), 'Out', 'Elastic', .5, true)
  354. for i = 2,#Labels,1 do
  355. local Lbl = Labels[i]
  356. local Last = Labels[i-1]
  357. local Sz = Last.Ui.Size.Y.Offset
  358. local CurSz = Lbl.Ui.Size.Y.Offset
  359. Lbl.Ui:TweenSizeAndPosition(UDim2.new(Lbl.SScale,0,0,-10-Sz),UDim2.new(Lbl.PScale,0,1,0),'Out',Style,.01,true)
  360. local Alg = (255/((MainFrame.AbsoluteSize.Y/2) - CurSz))
  361. local Clr = Color3.new(Alg,0,Alg)
  362. --Lbl.Ui.ImageColor3 = Functions:Lerp(Lbl.Ui.ImageColor3, Clr, .2)
  363. --swait()
  364. end
  365. end
  366. end
  367.  
  368. Player.Chatted:connect(function(Message)
  369. if Message:sub(1,1) == '!' and tonumber(Message:sub(2,2)) ~= nil then
  370. local LastId = Sound.SoundId
  371. local Success, Error = pcall(function()
  372. local Id = Message:sub(2)
  373. Audio = Id
  374. Sound.SoundId = Rbx..Id
  375. Sound:Play()
  376. Data = Market:GetProductInfo(Id)
  377. end)
  378. if not Success then
  379. Sound.SoundId = LastId
  380. Sound:Play()
  381. warn(Error)
  382. end
  383. end
  384. end)
  385.  
  386. spawn(Functions.MakeVisualizer)
  387. warn('Loaded; created by SavageMunkey')
  388. print'Say "!" followed by an id to play a different sound'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement