-- LocalScript -> StarterPlayer > StarterPlayerScripts -- One single script. Cool looping Sound ID menu. -- X button = 100% CLOSE (GUI fully destroyed). Press RightShift to rebuild/open it. local Players = game:GetService("Players") local UserInputService = game:GetService("UserInputService") local TweenService = game:GetService("TweenService") local SoundService = game:GetService("SoundService") local player = Players.LocalPlayer local playerGui = player:WaitForChild("PlayerGui") --------------------------------------------------------------------------- -- THEME --------------------------------------------------------------------------- local THEME = { Bg = Color3.fromRGB(22, 22, 28), BgHeader = Color3.fromRGB(30, 30, 38), Card = Color3.fromRGB(38, 38, 48), CardHover = Color3.fromRGB(48, 48, 60), Accent = Color3.fromRGB(120, 90, 255), Accent2 = Color3.fromRGB(60, 200, 255), Play = Color3.fromRGB(60, 190, 120), Stop = Color3.fromRGB(220, 90, 90), Delete = Color3.fromRGB(200, 70, 70), Text = Color3.fromRGB(235, 235, 245), TextDim = Color3.fromRGB(150, 150, 165), } --------------------------------------------------------------------------- -- SOUND (LOOPED FOREVER) --------------------------------------------------------------------------- local sound = Instance.new("Sound") sound.Name = "MenuSoundPlayer" sound.Volume = 1 sound.Looped = true sound.Parent = SoundService -- Saved IDs persist between open/close because they live OUTSIDE the GUI local savedIds = {} --------------------------------------------------------------------------- -- HELPERS --------------------------------------------------------------------------- local function new(className, props, parent) local obj = Instance.new(className) for k, v in pairs(props) do obj[k] = v end if parent then obj.Parent = parent end return obj end local function corner(radius, parent) return new("UICorner", { CornerRadius = UDim.new(0, radius) }, parent) end local function stroke(color, thickness, transparency, parent) return new("UIStroke", { Color = color, Thickness = thickness or 1, Transparency = transparency or 0, ApplyStrokeMode = Enum.ApplyStrokeMode.Border, }, parent) end local function gradient(parent, c1, c2, rotation) return new("UIGradient", { Color = ColorSequence.new(c1, c2), Rotation = rotation or 90, }, parent) end local function hover(obj, normalColor, hoverColor, strokeObj) obj.MouseEnter:Connect(function() TweenService:Create(obj, TweenInfo.new(0.15), { BackgroundColor3 = hoverColor }):Play() if strokeObj then TweenService:Create(strokeObj, TweenInfo.new(0.15), { Color = THEME.Accent }):Play() end end) obj.MouseLeave:Connect(function() TweenService:Create(obj, TweenInfo.new(0.15), { BackgroundColor3 = normalColor }):Play() if strokeObj then TweenService:Create(strokeObj, TweenInfo.new(0.15), { Color = Color3.fromRGB(60, 60, 75) }):Play() end end) end local function extractDigits(text) local raw = tostring(text):gsub("%s+", "") if raw == "" then return nil end return raw:match("(%d+)") end --------------------------------------------------------------------------- -- BUILD MENU (can be called again after 100% close) --------------------------------------------------------------------------- local currentGui = nil local function buildMenu() -- wipe any old one if currentGui then currentGui:Destroy() currentGui = nil end local gui = new("ScreenGui", { Name = "SoundMenuGui", ResetOnSpawn = false, IgnoreGuiInset = true, ZIndexBehavior = Enum.ZIndexBehavior.Sibling, }, playerGui) currentGui = gui ----------------------------------------------------------------------- -- MENU FRAME ----------------------------------------------------------------------- local menu = new("Frame", { Name = "Menu", Size = UDim2.fromOffset(360, 500), Position = UDim2.new(0.5, -180, 0.5, -250), BackgroundColor3 = THEME.Bg, BorderSizePixel = 0, ClipsDescendants = true, }, gui) corner(14, menu) stroke(Color3.fromRGB(70, 70, 90), 1.5, 0, menu) -- soft outer glow new("ImageLabel", { Size = UDim2.new(1, 40, 1, 40), Position = UDim2.fromOffset(-20, -20), BackgroundTransparency = 1, Image = "rbxassetid://1316045217", ImageColor3 = THEME.Accent, ImageTransparency = 0.65, ScaleType = Enum.ScaleType.Slice, SliceCenter = Rect.new(10, 10, 118, 118), ZIndex = 0, }, menu) ----------------------------------------------------------------------- -- HEADER ----------------------------------------------------------------------- local header = new("Frame", { Name = "Header", Size = UDim2.new(1, 0, 0, 56), BackgroundColor3 = THEME.BgHeader, BorderSizePixel = 0, ZIndex = 2, }, menu) corner(14, header) new("Frame", { Size = UDim2.new(1, 0, 0, 14), Position = UDim2.new(0, 0, 1, -14), BackgroundColor3 = THEME.BgHeader, BorderSizePixel = 0, ZIndex = 2, }, header) gradient(header, Color3.fromRGB(55, 40, 120), THEME.BgHeader, 90) new("TextLabel", { Size = UDim2.new(1, -130, 1, 0), Position = UDim2.fromOffset(18, 0), BackgroundTransparency = 1, Text = "SOUND ID MENU", TextColor3 = THEME.Text, TextXAlignment = Enum.TextXAlignment.Left, Font = Enum.Font.GothamBold, TextSize = 17, ZIndex = 3, }, header) new("TextLabel", { Size = UDim2.new(1, -130, 0, 14), Position = UDim2.fromOffset(19, 34), BackgroundTransparency = 1, Text = "Loop • Play • Save", TextColor3 = THEME.TextDim, TextXAlignment = Enum.TextXAlignment.Left, Font = Enum.Font.Gotham, TextSize = 11, ZIndex = 3, }, header) local minimizeButton = new("TextButton", { Size = UDim2.fromOffset(32, 32), Position = UDim2.new(1, -80, 0, 12), BackgroundColor3 = THEME.Card, BorderSizePixel = 0, Text = "–", TextColor3 = THEME.Text, Font = Enum.Font.GothamBold, TextSize = 18, AutoButtonColor = false, ZIndex = 3, }, header) corner(8, minimizeButton) local minStroke = stroke(Color3.fromRGB(70, 70, 90), 1, 0, minimizeButton) hover(minimizeButton, THEME.Card, THEME.CardHover, minStroke) local closeButton = new("TextButton", { Size = UDim2.fromOffset(32, 32), Position = UDim2.new(1, -42, 0, 12), BackgroundColor3 = THEME.Card, BorderSizePixel = 0, Text = "X", TextColor3 = THEME.Text, Font = Enum.Font.GothamBold, TextSize = 14, AutoButtonColor = false, ZIndex = 3, }, header) corner(8, closeButton) stroke(Color3.fromRGB(70, 70, 90), 1, 0, closeButton) closeButton.MouseEnter:Connect(function() TweenService:Create(closeButton, TweenInfo.new(0.15), { BackgroundColor3 = THEME.Stop }):Play() end) closeButton.MouseLeave:Connect(function() TweenService:Create(closeButton, TweenInfo.new(0.15), { BackgroundColor3 = THEME.Card }):Play() end) ----------------------------------------------------------------------- -- BODY ----------------------------------------------------------------------- local body = new("Frame", { Name = "Body", Size = UDim2.new(1, -32, 1, -72), Position = UDim2.fromOffset(16, 62), BackgroundTransparency = 1, ZIndex = 2, }, menu) new("TextLabel", { Size = UDim2.new(1, 0, 0, 16), BackgroundTransparency = 1, Text = "SOUND ID", TextColor3 = THEME.TextDim, TextXAlignment = Enum.TextXAlignment.Left, Font = Enum.Font.GothamBold, TextSize = 11, ZIndex = 2, }, body) local inputWrapper = new("Frame", { Size = UDim2.new(1, 0, 0, 42), Position = UDim2.fromOffset(0, 20), BackgroundColor3 = THEME.Card, BorderSizePixel = 0, ZIndex = 2, }, body) corner(10, inputWrapper) local inputStroke = stroke(Color3.fromRGB(60, 60, 75), 1, 0, inputWrapper) local idBox = new("TextBox", { Size = UDim2.new(1, -20, 1, 0), Position = UDim2.fromOffset(12, 0), BackgroundTransparency = 1, PlaceholderText = "Paste any Roblox Sound ID...", PlaceholderColor3 = THEME.TextDim, Text = "", ClearTextOnFocus = false, TextColor3 = THEME.Text, TextXAlignment = Enum.TextXAlignment.Left, Font = Enum.Font.Gotham, TextSize = 14, ZIndex = 2, }, inputWrapper) idBox.Focused:Connect(function() TweenService:Create(inputStroke, TweenInfo.new(0.15), { Color = THEME.Accent }):Play() end) idBox.FocusLost:Connect(function() TweenService:Create(inputStroke, TweenInfo.new(0.15), { Color = Color3.fromRGB(60, 60, 75) }):Play() end) -- PLAY / STOP local playButton = new("TextButton", { Size = UDim2.new(0.5, -5, 0, 42), Position = UDim2.fromOffset(0, 74), BackgroundColor3 = THEME.Play, BorderSizePixel = 0, Text = "▶ Loop Play", TextColor3 = Color3.new(1, 1, 1), Font = Enum.Font.GothamBold, TextSize = 14, AutoButtonColor = false, ZIndex = 2, }, body) corner(10, playButton) local playStroke = stroke(Color3.fromRGB(80, 220, 150), 1, 0.4, playButton) hover(playButton, THEME.Play, Color3.fromRGB(75, 210, 140), playStroke) local stopButton = new("TextButton", { Size = UDim2.new(0.5, -5, 0, 42), Position = UDim2.new(0.5, 5, 0, 74), BackgroundColor3 = THEME.Stop, BorderSizePixel = 0, Text = "■ Stop", TextColor3 = Color3.new(1, 1, 1), Font = Enum.Font.GothamBold, TextSize = 14, AutoButtonColor = false, ZIndex = 2, }, body) corner(10, stopButton) local stopStroke = stroke(Color3.fromRGB(240, 110, 110), 1, 0.4, stopButton) hover(stopButton, THEME.Stop, Color3.fromRGB(235, 105, 105), stopStroke) -- SAVE local saveButton = new("TextButton", { Size = UDim2.new(1, 0, 0, 40), Position = UDim2.fromOffset(0, 126), BackgroundColor3 = THEME.Accent, BorderSizePixel = 0, Text = "+ Save Sound ID", TextColor3 = Color3.new(1, 1, 1), Font = Enum.Font.GothamBold, TextSize = 14, AutoButtonColor = false, ZIndex = 2, }, body) corner(10, saveButton) gradient(saveButton, THEME.Accent, THEME.Accent2, 45) stroke(THEME.Accent2, 1, 0.4, saveButton) saveButton.MouseEnter:Connect(function() TweenService:Create(saveButton, TweenInfo.new(0.15), { BackgroundColor3 = Color3.fromRGB(140, 110, 255) }):Play() end) saveButton.MouseLeave:Connect(function() TweenService:Create(saveButton, TweenInfo.new(0.15), { BackgroundColor3 = THEME.Accent }):Play() end) -- STATUS local status = new("TextLabel", { Size = UDim2.new(1, 0, 0, 22), Position = UDim2.fromOffset(0, 174), BackgroundTransparency = 1, Text = "Status: Ready", TextColor3 = THEME.TextDim, TextXAlignment = Enum.TextXAlignment.Left, Font = Enum.Font.Gotham, TextSize = 12, ZIndex = 2, }, body) -- SAVED HEADER local listHeader = new("Frame", { Size = UDim2.new(1, 0, 0, 18), Position = UDim2.fromOffset(0, 202), BackgroundTransparency = 1, ZIndex = 2, }, body) new("TextLabel", { Size = UDim2.new(1, -80, 1, 0), BackgroundTransparency = 1, Text = "SAVED SOUNDS", TextColor3 = THEME.Text, TextXAlignment = Enum.TextXAlignment.Left, Font = Enum.Font.GothamBold, TextSize = 11, ZIndex = 2, }, listHeader) local countLabel = new("TextLabel", { Size = UDim2.fromOffset(80, 18), Position = UDim2.new(1, -80, 0, 0), BackgroundTransparency = 1, Text = "0 saved", TextColor3 = THEME.TextDim, TextXAlignment = Enum.TextXAlignment.Right, Font = Enum.Font.Gotham, TextSize = 11, ZIndex = 2, }, listHeader) -- LIST local listFrame = new("ScrollingFrame", { Size = UDim2.new(1, 0, 1, -232), Position = UDim2.fromOffset(0, 226), BackgroundTransparency = 1, BorderSizePixel = 0, ScrollBarThickness = 4, ScrollBarImageColor3 = THEME.Accent, CanvasSize = UDim2.new(0, 0, 0, 0), ZIndex = 2, }, body) new("UIListLayout", { Padding = UDim.new(0, 8), SortOrder = Enum.SortOrder.LayoutOrder, }, listFrame) local emptyHint = new("TextLabel", { Size = UDim2.new(1, 0, 0, 60), BackgroundTransparency = 1, Text = "No saved sounds yet.\nSave an ID to see it here.", TextColor3 = THEME.TextDim, TextWrapped = true, Font = Enum.Font.Gotham, TextSize = 12, ZIndex = 2, }, listFrame) ----------------------------------------------------------------------- -- LOGIC ----------------------------------------------------------------------- local function playId(digits) sound:Stop() sound.SoundId = "rbxassetid://" .. digits sound.Looped = true sound:Play() status.Text = "Status: ∞ Looping " .. digits end local function refreshList() for _, child in ipairs(listFrame:GetChildren()) do if child:IsA("TextButton") then child:Destroy() end end emptyHint.Visible = (#savedIds == 0) emptyHint.LayoutOrder = 1 countLabel.Text = #savedIds .. " saved" for index, digits in ipairs(savedIds) do local card = new("TextButton", { Name = "Saved_" .. digits, Size = UDim2.new(1, -8, 0, 44), BackgroundColor3 = THEME.Card, BorderSizePixel = 0, Text = "", AutoButtonColor = false, LayoutOrder = index, ZIndex = 2, }, listFrame) corner(10, card) local cardStroke = stroke(Color3.fromRGB(60, 60, 75), 1, 0, card) new("TextLabel", { Size = UDim2.new(1, -52, 0, 16), Position = UDim2.fromOffset(12, 6), BackgroundTransparency = 1, Text = "ID " .. digits, TextColor3 = THEME.Text, TextXAlignment = Enum.TextXAlignment.Left, Font = Enum.Font.GothamBold, TextSize = 13, ZIndex = 3, }, card) new("TextLabel", { Size = UDim2.new(1, -52, 0, 14), Position = UDim2.fromOffset(12, 23), BackgroundTransparency = 1, Text = "Tap to loop • X to delete", TextColor3 = THEME.TextDim, TextXAlignment = Enum.TextXAlignment.Left, Font = Enum.Font.Gotham, TextSize = 11, ZIndex = 3, }, card) local deleteButton = new("TextButton", { Size = UDim2.fromOffset(32, 32), Position = UDim2.new(1, -40, 0, 6), BackgroundColor3 = THEME.Delete, BorderSizePixel = 0, Text = "X", TextColor3 = Color3.new(1, 1, 1), Font = Enum.Font.GothamBold, TextSize = 13, AutoButtonColor = false, ZIndex = 4, }, card) corner(8, deleteButton) card.MouseEnter:Connect(function() TweenService:Create(card, TweenInfo.new(0.15), { BackgroundColor3 = THEME.CardHover }):Play() TweenService:Create(cardStroke, TweenInfo.new(0.15), { Color = THEME.Accent }):Play() end) card.MouseLeave:Connect(function() TweenService:Create(card, TweenInfo.new(0.15), { BackgroundColor3 = THEME.Card }):Play() TweenService:Create(cardStroke, TweenInfo.new(0.15), { Color = Color3.fromRGB(60, 60, 75) }):Play() end) card.MouseButton1Click:Connect(function() idBox.Text = digits playId(digits) end) deleteButton.MouseButton1Click:Connect(function() for i, d in ipairs(savedIds) do if d == digits then table.remove(savedIds, i) break end end refreshList() status.Text = "Status: Deleted " .. digits end) end task.defer(function() listFrame.CanvasSize = UDim2.new(0, 0, 0, listFrame.UIListLayout.AbsoluteContentSize.Y + 4) end) end ----------------------------------------------------------------------- -- BUTTON EVENTS ----------------------------------------------------------------------- playButton.MouseButton1Click:Connect(function() local digits = extractDigits(idBox.Text) if not digits then status.Text = "Status: Enter a valid Sound ID first." return end playId(digits) end) stopButton.MouseButton1Click:Connect(function() sound:Stop() status.Text = "Status: ■ Stopped" end) saveButton.MouseButton1Click:Connect(function() local digits = extractDigits(idBox.Text) if not digits then status.Text = "Status: Enter a valid Sound ID to save." return end for _, d in ipairs(savedIds) do if d == digits then status.Text = "Status: That ID is already saved." return end end table.insert(savedIds, digits) refreshList() status.Text = "Status: Saved " .. digits end) ----------------------------------------------------------------------- -- MINIMIZE / CLOSE (100%) / DRAG ----------------------------------------------------------------------- local collapsed = false local expandedSize = UDim2.fromOffset(360, 500) local collapsedSize = UDim2.fromOffset(360, 56) minimizeButton.MouseButton1Click:Connect(function() collapsed = not collapsed body.Visible = not collapsed TweenService:Create(menu, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { Size = collapsed and collapsedSize or expandedSize, }):Play() minimizeButton.Text = collapsed and "+" or "–" end) -- X = 100% CLOSE: stops sound, destroys the whole GUI, no floating button left. -- Reopen with RightShift. closeButton.MouseButton1Click:Connect(function() sound:Stop() if currentGui then currentGui:Destroy() currentGui = nil end end) -- DRAG do local dragging, dragStart, startPos header.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = true dragStart = input.Position startPos = menu.Position input.Changed:Connect(function() if input.UserInputState == Enum.UserInputState.End then dragging = false end end) end end) UserInputService.InputChanged:Connect(function(input) if dragging and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then local delta = input.Position - dragStart menu.Position = UDim2.new( startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y ) end end) end refreshList() end --------------------------------------------------------------------------- -- OPEN BY DEFAULT + HOTKEY TO REBUILD AFTER 100% CLOSE --------------------------------------------------------------------------- buildMenu() UserInputService.InputBegan:Connect(function(input, gameProcessed) if gameProcessed then return end if input.KeyCode == Enum.KeyCode.RightShift then if currentGui == nil then buildMenu() else -- already open: fully close it too (true toggle) sound:Stop() currentGui:Destroy() currentGui = nil end end end)