-- Audio visualizer -- by yoolz/Larkinian local LMG2L = {}; -- Players.larkinianen.PlayerGui.ScreenGui LMG2L["ScreenGui_1"] = Instance.new("ScreenGui", game:GetService("Players").LocalPlayer:WaitForChild("PlayerGui")); LMG2L["ScreenGui_1"]["ZIndexBehavior"] = Enum.ZIndexBehavior.Sibling; -- Players.larkinianen.PlayerGui.ScreenGui.Frame LMG2L["Frame_2"] = Instance.new("Frame", LMG2L["ScreenGui_1"]); LMG2L["Frame_2"]["BorderSizePixel"] = 0; LMG2L["Frame_2"]["BackgroundColor3"] = Color3.fromRGB(255, 255, 255); LMG2L["Frame_2"]["Size"] = UDim2.new(0, 264, 0, 252); LMG2L["Frame_2"]["Position"] = UDim2.new(0, 584, 0, 30); -- Players.larkinianen.PlayerGui.ScreenGui.Frame.UIGradient LMG2L["UIGradient_3"] = Instance.new("UIGradient", LMG2L["Frame_2"]); LMG2L["UIGradient_3"]["Color"] = ColorSequence.new{ColorSequenceKeypoint.new(0.000, Color3.fromRGB(83, 120, 127)),ColorSequenceKeypoint.new(0.425, Color3.fromRGB(82, 120, 127)),ColorSequenceKeypoint.new(1.000, Color3.fromRGB(255, 255, 255))}; -- Players.larkinianen.PlayerGui.ScreenGui.Frame.TextBox LMG2L["TextBox_4"] = Instance.new("TextBox", LMG2L["Frame_2"]); LMG2L["TextBox_4"]["BackgroundColor3"] = Color3.fromRGB(255, 255, 255); LMG2L["TextBox_4"]["PlaceholderText"] = [[Sound Id]]; LMG2L["TextBox_4"]["Size"] = UDim2.new(0, 214, 0, 34); LMG2L["TextBox_4"]["Position"] = UDim2.new(0, 18, 0, 34); LMG2L["TextBox_4"]["Text"] = [[]]; -- Players.larkinianen.PlayerGui.ScreenGui.Frame.lol LMG2L["lol_5"] = Instance.new("TextBox", LMG2L["Frame_2"]); LMG2L["lol_5"]["Name"] = [[lol]]; LMG2L["lol_5"]["BackgroundColor3"] = Color3.fromRGB(255, 255, 255); LMG2L["lol_5"]["PlaceholderText"] = [[Pitch]]; LMG2L["lol_5"]["Size"] = UDim2.new(0, 104, 0, 30); LMG2L["lol_5"]["Position"] = UDim2.new(0, 8, 0, 74); LMG2L["lol_5"]["Text"] = [[]]; -- Players.larkinianen.PlayerGui.ScreenGui.Frame.TextBox LMG2L["TextBox_6"] = Instance.new("TextBox", LMG2L["Frame_2"]); LMG2L["TextBox_6"]["BackgroundColor3"] = Color3.fromRGB(255, 255, 255); LMG2L["TextBox_6"]["PlaceholderText"] = [[Distortion]]; LMG2L["TextBox_6"]["Size"] = UDim2.new(0, 118, 0, 30); LMG2L["TextBox_6"]["Position"] = UDim2.new(0, 124, 0, 74); LMG2L["TextBox_6"]["Text"] = [[]]; -- Players.larkinianen.PlayerGui.ScreenGui.Frame.TextButton LMG2L["TextButton_7"] = Instance.new("TextButton", LMG2L["Frame_2"]); LMG2L["TextButton_7"]["TextSize"] = 10; LMG2L["TextButton_7"]["BackgroundColor3"] = Color3.fromRGB(255, 255, 255); LMG2L["TextButton_7"]["Size"] = UDim2.new(0, 182, 0, 34); LMG2L["TextButton_7"]["Text"] = [[Play]]; LMG2L["TextButton_7"]["Position"] = UDim2.new(0, 26, 0, 120); -- Players.larkinianen.PlayerGui.ScreenGui.Frame.TextLabel LMG2L["TextLabel_8"] = Instance.new("TextLabel", LMG2L["Frame_2"]); LMG2L["TextLabel_8"]["BorderSizePixel"] = 0; LMG2L["TextLabel_8"]["TextSize"] = 12; LMG2L["TextLabel_8"]["BackgroundColor3"] = Color3.fromRGB(255, 255, 255); LMG2L["TextLabel_8"]["TextColor3"] = Color3.fromRGB(110, 187, 195); LMG2L["TextLabel_8"]["BackgroundTransparency"] = 1; LMG2L["TextLabel_8"]["Size"] = UDim2.new(0, 146, 0, 22); LMG2L["TextLabel_8"]["Text"] = [[Music player]]; LMG2L["TextLabel_8"]["Position"] = UDim2.new(0, 48, 0, 6); -- Players.larkinianen.PlayerGui.ScreenGui.Frame.Frame LMG2L["Frame_9"] = Instance.new("Frame", LMG2L["Frame_2"]); LMG2L["Frame_9"]["BorderSizePixel"] = 0; LMG2L["Frame_9"]["BackgroundColor3"] = Color3.fromRGB(78, 113, 119); LMG2L["Frame_9"]["Size"] = UDim2.new(0, 18, 0, 252); LMG2L["Frame_9"]["Position"] = UDim2.new(0, -16, 0, 0); -- Players.larkinianen.PlayerGui.ScreenGui.Frame.Frame.TextButton LMG2L["TextButton_a"] = Instance.new("TextButton", LMG2L["Frame_9"]); LMG2L["TextButton_a"]["BorderSizePixel"] = 0; LMG2L["TextButton_a"]["TextSize"] = 10; LMG2L["TextButton_a"]["BackgroundColor3"] = Color3.fromRGB(255, 255, 255); LMG2L["TextButton_a"]["BackgroundTransparency"] = 1; LMG2L["TextButton_a"]["Size"] = UDim2.new(0, 14, 0, 30); LMG2L["TextButton_a"]["Text"] = [[<]]; LMG2L["TextButton_a"]["Position"] = UDim2.new(0, 2, 0, 102); -- Players.larkinianen.PlayerGui.ScreenGui.Frame.TextLabel LMG2L["TextLabel_b"] = Instance.new("TextLabel", LMG2L["Frame_2"]); LMG2L["TextLabel_b"]["BorderSizePixel"] = 0; LMG2L["TextLabel_b"]["BackgroundColor3"] = Color3.fromRGB(255, 255, 255); LMG2L["TextLabel_b"]["BackgroundTransparency"] = 1; LMG2L["TextLabel_b"]["Size"] = UDim2.new(0, 220, 0, 46); LMG2L["TextLabel_b"]["Text"] = [[I didn't have that much time so I made this ahh gui]]; LMG2L["TextLabel_b"]["Position"] = UDim2.new(0, 14, 0, 170); local gui = LMG2L["ScreenGui_1"] local frame = LMG2L["Frame_2"] local TweenService = game:GetService("TweenService") local toggleButton = LMG2L["TextButton_a"] frame.AnchorPoint = Vector2.new(1, 0) frame.Position = UDim2.new(1, 0, 0, 30) local aberta = false local larguraBarra = 4 local function getPosicaoFechada() local larguraReal = frame.AbsoluteSize.X local parteVisivel = larguraBarra local offset = larguraReal - parteVisivel return UDim2.new(1, offset, 0, 30) end frame.Position = getPosicaoFechada() toggleButton.MouseButton1Click:Connect(function() local destino if aberta then destino = getPosicaoFechada() else destino = UDim2.new(1, 0, 0, 30) end local tween = TweenService:Create( frame, TweenInfo.new(0.35, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {Position = destino} ) tween:Play() aberta = not aberta end) local musicBox = LMG2L["TextBox_4"] local pitchBox = LMG2L["lol_5"] local distBox = LMG2L["TextBox_6"] local playButton = LMG2L["TextButton_7"] local player = game.Players.LocalPlayer local character = player.Character or player.CharacterAdded:Wait() local root = character:WaitForChild("HumanoidRootPart") local runService = game:GetService("RunService") local quantidade = 40 local raioBase = 7 local alturaBase = 0.1 local sound = Instance.new("Sound") sound.Parent = root sound.Volume = 1 sound.Looped = true local distortion = Instance.new("DistortionSoundEffect") distortion.Parent = sound local blocos = {} for i = 1, quantidade do local bloco = Instance.new("Part") bloco.Size = Vector3.new(0.25, alturaBase, 0.25) bloco.Anchored = true bloco.CanCollide = false bloco.Material = Enum.Material.Neon bloco.TopSurface = Enum.SurfaceType.Smooth bloco.BottomSurface = Enum.SurfaceType.Smooth bloco.Color = Color3.fromRGB(255,255,255) bloco.Parent = workspace table.insert(blocos, bloco) end playButton.MouseButton1Click:Connect(function() if musicBox.Text ~= "" then sound.SoundId = "rbxassetid://" .. musicBox.Text end sound.PlaybackSpeed = tonumber(pitchBox.Text) or 1 distortion.Level = tonumber(distBox.Text) or 0 sound:Play() end) local MAX_ALTURA = 6 local MIN_ALTURA = 0.1 local SUAVIZACAO = 0.25 local ESCALA_LOUDNESS = 0.0027 local ESCALA_RAIO = 0.03 local rotacao = 0 local velocidadeRotacao = 0.2 local variacao = {} local alturaAtual = {} local boostAleatorio = {} local raioAtual = {} for i = 1, quantidade do variacao[i] = math.random(80,120) / 100 alturaAtual[i] = MIN_ALTURA raioAtual[i] = raioBase if math.random(1,4) == 1 then boostAleatorio[i] = math.random(130,190) / 100 else boostAleatorio[i] = math.random(70,110) / 100 end end runService.RenderStepped:Connect(function(deltaTime) rotacao = rotacao + velocidadeRotacao * deltaTime local loudness = sound.PlaybackLoudness * ESCALA_LOUDNESS for i, bloco in ipairs(blocos) do local angulo = (2 * math.pi / quantidade) * i + rotacao local tipoBeat if i % 3 == 0 then tipoBeat = loudness * 1.2 elseif i % 3 == 1 then tipoBeat = loudness * 0.9 else tipoBeat = loudness * 0.6 end local alvoAltura = MIN_ALTURA + (tipoBeat * variacao[i] * boostAleatorio[i]) alvoAltura = math.clamp(alvoAltura, MIN_ALTURA, MAX_ALTURA) alturaAtual[i] = alturaAtual[i] + (alvoAltura - alturaAtual[i]) * SUAVIZACAO local alvoRaio = raioBase + (tipoBeat * 20 * ESCALA_RAIO) raioAtual[i] = raioAtual[i] + (alvoRaio - raioAtual[i]) * SUAVIZACAO local posX = root.Position.X + math.cos(angulo) * raioAtual[i] local posZ = root.Position.Z + math.sin(angulo) * raioAtual[i] bloco.Size = Vector3.new(0.25, alturaAtual[i], 0.25) bloco.Position = Vector3.new(posX, root.Position.Y, posZ) if sound.IsPlaying then local hue = (i/quantidade + tick()*0.1) % 1 local saturacao = 0.25 + math.clamp(loudness * 0.5, 0, 0.2) bloco.Color = Color3.fromHSV(hue, saturacao, 1) else bloco.Color = Color3.fromRGB(255,255,255) end end end) return LMG2L["ScreenGui_1"], require;