--==================================================-- -- MXR نسخه الأصوات + تطوير mx_501xm -- -- Programmer: mx_501xm (Saudi Programmer) -- --==================================================-- local Players = game:GetService("Players") local HttpService = game:GetService("HttpService") local SoundService = game:GetService("SoundService") local UserInputService = game:GetService("UserInputService") local RunService = game:GetService("RunService") local LocalPlayer = Players.LocalPlayer local FILENAME = "mxr_music_folders_data.json" local foldersList = {} -- نظام اللغات local currentLang = "ar" local translations = { ar = { search = "🔍 بحث عام في كل أغاني...", newFolder = "+ مجلد جديد", addSong = "+ إضافة أغنية", foldersTitle = "المجلدات", back = "⬅ رجوع", play = "تشغيل", stop = "إيقاف", delete = "حذف", edit = "تعديل", copy = "نسخ", defaultFolderName = "العامة (كود مجاني)", activeLangText = "العربية 🇸🇦", modalDeleteTitle = "حذف", modalDeleteSong = "هل أنت متأكد من حذف هذه الأغنية؟", modalDeleteFolder = "هل أنت متأكد من حذف المجلد وجميع أغانيه؟", modalCloseScript = "هل أنت متأكد أنك تريد إغلاق السكربت؟", yes = "نعم", no = "لا", createFolderTitle = "📁 إنشاء مجلد جديد", editFolderTitle = "📁 تعديل اسم المجلد", editSongTitle = "🎵 تعديل اسم الأغنية", folderInputPlaceholder = "اسم المجلد...", songNamePlaceholder = "اسم الأغنية...", createBtn = "إنشاء", saveBtn = "حفظ", cancelBtn = "إلغاء", addSongTitle = "🎵 إضافة أغنية جديدة", songIdPlaceholder = "كود ID الأغنية...", copyCodeBtn = "نسخ الكود", codeCopied = "تم النسخ بنجاح!" }, en = { search = "🔍 General search across all songs...", newFolder = "+ New Folder", addSong = "+ Add Song", foldersTitle = "Folders", back = "⬅ Back", play = "Play", stop = "Stop", delete = "Delete", edit = "Edit", copy = "Copy", defaultFolderName = "General (Free Code)", activeLangText = "English 🇺🇸", modalDeleteTitle = "Delete", modalDeleteSong = "Are you sure you want to delete this song?", modalDeleteFolder = "Are you sure you want to delete this folder and its songs?", modalCloseScript = "Are you sure you want to close the script?", yes = "Yes", no = "No", createFolderTitle = "📁 Create New Folder", editFolderTitle = "📁 Edit Folder Name", editSongTitle = "🎵 Edit Song Name", folderInputPlaceholder = "Folder name...", songNamePlaceholder = "Song name...", createBtn = "Create", saveBtn = "Save", cancelBtn = "Cancel", addSongTitle = "🎵 Add New Song", songIdPlaceholder = "Song ID...", copyCodeBtn = "Copy Code", codeCopied = "Copied!" }, ru = { search = "🔍 Общий поиск по всем песням...", newFolder = "+ Новая папка", addSong = "+ Добавить песню", foldersTitle = "Папки", back = "⬅ Назад", play = "Воспр", stop = "Стоп", delete = "Удалить", edit = "Изм", copy = "Копировать", defaultFolderName = "Общие (Бесплатно)", activeLangText = "Русский 🇷🇺", modalDeleteTitle = "Удалить", modalDeleteSong = "Вы уверены, что хотите удалить эту песню?", modalDeleteFolder = "Удалить эту папку и все её песни?", modalCloseScript = "Вы уверены, что хотите закрыть скрипт?", yes = "Да", no = "Нет", createFolderTitle = "📁 Создать папку", editFolderTitle = "📁 Изменить папку", editSongTitle = "🎵 Изменить песню", folderInputPlaceholder = "Имя папки...", songNamePlaceholder = "Название песни...", createBtn = "Создать", saveBtn = "Сохранить", cancelBtn = "Отмена", addSongTitle = "🎵 Добавить песню", songIdPlaceholder = "ID песни...", copyCodeBtn = "Копировать", codeCopied = "Скопировано!" }, zh = { search = "🔍 搜索所有歌曲...", newFolder = "+ 新建文件夹", addSong = "+ 添加歌曲", foldersTitle = "文件夹", back = "⬅ 返回", play = "播放", stop = "停止", delete = "删除", edit = "编辑", copy = "复制", defaultFolderName = "通用 (免费)", activeLangText = "中文 🇨🇳", modalDeleteTitle = "删除", modalDeleteSong = "确定要删除这首歌吗?", modalDeleteFolder = "确定要删除此文件夹及其所有歌曲吗?", modalCloseScript = "确定要关闭脚本吗?", yes = "是", no = "否", createFolderTitle = "📁 创建新文件夹", editFolderTitle = "📁 编辑文件夹名称", editSongTitle = "🎵 编辑歌曲名称", folderInputPlaceholder = "文件夹名称...", songNamePlaceholder = "歌曲名称...", createBtn = "创建", saveBtn = "保存", cancelBtn = "取消", addSongTitle = "🎵 添加新歌曲", songIdPlaceholder = "歌曲ID...", copyCodeBtn = "复制代码", codeCopied = "已复制!" } } local function t(key) return translations[currentLang][key] or translations["ar"][key] or key end local function loadData() local defaultFolder = {name = t("defaultFolderName"), songs = {{name = "كود مجاني - 86317637164248", code = "86317637164248"}}} if readfile and isfile and isfile(FILENAME) then local success, result = pcall(function() return HttpService:JSONDecode(readfile(FILENAME)) end) if success and type(result) == "table" then foldersList = result if #foldersList > 0 then foldersList[1].name = t("defaultFolderName") -- التأكد من وجود كود الهدية في العامة دائماً local foundCode = false for _, song in ipairs(foldersList[1].songs) do if song.code == "86317637164248" then foundCode = true break end end if not foundCode then table.insert(foldersList[1].songs, 1, {name = "كود مجاني - 86317637164248", code = "86317637164248"}) end else foldersList = {defaultFolder} end else foldersList = {defaultFolder} end else foldersList = {defaultFolder} end end loadData() local function saveData() if writefile then pcall(function() writefile(FILENAME, HttpService:JSONEncode(foldersList)) end) end end -- Audio Controller & State Sync local currentSound = nil local currentPlayingCode = nil local activePlayButtons = {} local function stopAudio() if currentSound then currentSound:Stop() currentSound:Destroy() currentSound = nil end currentPlayingCode = nil for code, btnInfo in pairs(activePlayButtons) do if btnInfo and btnInfo.Button and btnInfo.Button.Parent then btnInfo.Button.Text = "▶" btnInfo.Button.BackgroundColor3 = Color3.fromRGB(138, 43, 226) end end end local function playAudio(id, btn) local cleanId = id:match("%d+") if not cleanId then return end if currentPlayingCode == cleanId then stopAudio() return end stopAudio() currentPlayingCode = cleanId local sound = Instance.new("Sound") sound.SoundId = "rbxassetid://" .. cleanId sound.Volume = 1 sound.Looped = true sound.Parent = SoundService sound:Play() currentSound = sound if btn then btn.Text = "⏹" btn.BackgroundColor3 = Color3.fromRGB(210, 140, 0) end sound.Ended:Connect(function() if currentPlayingCode == cleanId then stopAudio() end end) end -- UI Construction local ScreenGui = Instance.new("ScreenGui") ScreenGui.Name = "MXR_MusicSaver" ScreenGui.ResetOnSpawn = false local successParent, _ = pcall(function() ScreenGui.Parent = game:GetService("CoreGui") end) if not successParent then ScreenGui.Parent = LocalPlayer:WaitForChild("PlayerGui") end -- Main Canvas Frame local MainFrame = Instance.new("Frame") MainFrame.Name = "MainFrame" MainFrame.Size = UDim2.new(0, 280, 0, 310) MainFrame.Position = UDim2.new(0.5, -140, 0.5, -155) MainFrame.BackgroundColor3 = Color3.fromRGB(15, 15, 22) MainFrame.BackgroundTransparency = 0.25 MainFrame.BorderSizePixel = 0 MainFrame.Active = true MainFrame.Draggable = true MainFrame.Parent = ScreenGui local MainUICorner = Instance.new("UICorner") MainUICorner.CornerRadius = UDim.new(0, 7) MainUICorner.Parent = MainFrame local MainStroke = Instance.new("UIStroke") MainStroke.Color = Color3.fromRGB(110, 45, 180) MainStroke.Transparency = 0.3 MainStroke.Thickness = 1.5 MainStroke.Parent = MainFrame -- زاوية منحنية احترافية لتكبير وتصغير الواجهة local ResizeContainer = Instance.new("Frame") ResizeContainer.Size = UDim2.new(0, 22, 0, 22) ResizeContainer.Position = UDim2.new(1, -22, 1, -22) ResizeContainer.BackgroundTransparency = 1 ResizeContainer.ZIndex = 50 ResizeContainer.Parent = MainFrame local Line1 = Instance.new("Frame") Line1.Size = UDim2.new(0, 14, 0, 2) Line1.Position = UDim2.new(1, -16, 1, -6) Line1.BackgroundColor3 = Color3.fromRGB(160, 140, 200) Line1.BorderSizePixel = 0 Line1.ZIndex = 51 Line1.Parent = ResizeContainer Instance.new("UICorner", Line1).CornerRadius = UDim.new(1, 0) local Line2 = Instance.new("Frame") Line2.Size = UDim2.new(0, 10, 0, 2) Line2.Position = UDim2.new(1, -12, 1, -10) Line2.BackgroundColor3 = Color3.fromRGB(160, 140, 200) Line2.BorderSizePixel = 0 Line2.ZIndex = 51 Line2.Parent = ResizeContainer Instance.new("UICorner", Line2).CornerRadius = UDim.new(1, 0) local ResizeBtn = Instance.new("TextButton") ResizeBtn.Size = UDim2.new(1, 0, 1, 0) ResizeBtn.BackgroundTransparency = 1 ResizeBtn.Text = "" ResizeBtn.ZIndex = 52 ResizeBtn.Parent = ResizeContainer local resizing = false local resizeStart = nil local startSize = nil ResizeBtn.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then resizing = true resizeStart = input.Position startSize = MainFrame.AbsoluteSize input.Changed:Connect(function() if input.UserInputState == Enum.UserInputState.End then resizing = false end end) end end) UserInputService.InputChanged:Connect(function(input) if resizing and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then local delta = input.Position - resizeStart local newWidth = math.clamp(startSize.X + delta.X, 240, 500) local newHeight = math.clamp(startSize.Y + delta.Y, 260, 500) MainFrame.Size = UDim2.new(0, newWidth, 0, newHeight) end end) -- Header local Header = Instance.new("Frame") Header.Size = UDim2.new(1, 0, 0, 28) Header.BackgroundColor3 = Color3.fromRGB(22, 18, 32) Header.BackgroundTransparency = 0.3 Header.BorderSizePixel = 0 Header.Parent = MainFrame local HeaderCorner = Instance.new("UICorner") HeaderCorner.CornerRadius = UDim.new(0, 7) HeaderCorner.Parent = Header local Title = Instance.new("TextLabel") Title.Size = UDim2.new(0.68, 0, 1, 0) Title.Position = UDim2.new(0.03, 0, 0, 0) Title.BackgroundTransparency = 1 Title.Text = "MXR | mx_501xm" Title.TextColor3 = Color3.fromRGB(255, 255, 255) Title.TextSize = 9.5 Title.Font = Enum.Font.GothamBold Title.TextXAlignment = Enum.TextXAlignment.Left Title.Parent = Header -- Control Buttons Container (Top Right) local TopButtonsContainer = Instance.new("Frame") TopButtonsContainer.Size = UDim2.new(0, 42, 0, 18) TopButtonsContainer.Position = UDim2.new(1, -46, 0, 5) TopButtonsContainer.BackgroundTransparency = 1 TopButtonsContainer.Parent = Header local MinimizeBtn = Instance.new("TextButton") MinimizeBtn.Size = UDim2.new(0, 18, 0, 18) MinimizeBtn.Position = UDim2.new(0, 0, 0, 0) MinimizeBtn.BackgroundColor3 = Color3.fromRGB(45, 40, 60) MinimizeBtn.Text = "-" MinimizeBtn.TextColor3 = Color3.fromRGB(255, 255, 255) MinimizeBtn.TextSize = 11 MinimizeBtn.Font = Enum.Font.GothamBold MinimizeBtn.Parent = TopButtonsContainer local MinCorner = Instance.new("UICorner") MinCorner.CornerRadius = UDim.new(0, 3) MinCorner.Parent = MinimizeBtn local CloseBtn = Instance.new("TextButton") CloseBtn.Size = UDim2.new(0, 18, 0, 18) CloseBtn.Position = UDim2.new(0, 21, 0, 0) CloseBtn.BackgroundColor3 = Color3.fromRGB(180, 40, 50) CloseBtn.Text = "X" CloseBtn.TextColor3 = Color3.fromRGB(255, 255, 255) CloseBtn.TextSize = 9 CloseBtn.Font = Enum.Font.GothamBold CloseBtn.Parent = TopButtonsContainer local CloseCorner = Instance.new("UICorner") CloseCorner.CornerRadius = UDim.new(0, 3) CloseCorner.Parent = CloseBtn -- Floating Icon local FloatingBtn = Instance.new("ImageButton") FloatingBtn.Name = "FloatingBtn" FloatingBtn.Size = UDim2.new(0, 38, 0, 38) FloatingBtn.Position = UDim2.new(1, -48, 0.5, -19) FloatingBtn.BackgroundColor3 = Color3.fromRGB(22, 18, 32) FloatingBtn.Image = "rbxassetid://6031075931" FloatingBtn.ImageColor3 = Color3.fromRGB(200, 150, 255) FloatingBtn.Visible = false FloatingBtn.Parent = ScreenGui local FloatCorner = Instance.new("UICorner") FloatCorner.CornerRadius = UDim.new(0, 19) FloatCorner.Parent = FloatingBtn local FloatStroke = Instance.new("UIStroke") FloatStroke.Color = Color3.fromRGB(138, 43, 226) FloatStroke.Thickness = 2 FloatStroke.Parent = FloatingBtn local floatDragging, floatDragInput, floatDragStart, floatStartPos local floatHasMoved = false FloatingBtn.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then floatDragging = true floatDragStart = input.Position floatStartPos = FloatingBtn.Position floatHasMoved = false input.Changed:Connect(function() if input.UserInputState == Enum.UserInputState.End then floatDragging = false end end) end end) FloatingBtn.InputChanged:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then floatDragInput = input end end) UserInputService.InputChanged:Connect(function(input) if input == floatDragInput and floatDragging then local delta = input.Position - floatDragStart if delta.Magnitude > 5 then floatHasMoved = true end FloatingBtn.Position = UDim2.new(floatStartPos.X.Scale, floatStartPos.X.Offset + delta.X, floatStartPos.Y.Scale, floatStartPos.Y.Offset + delta.Y) end end) FloatingBtn.MouseButton1Click:Connect(function() if not floatHasMoved then MainFrame.Visible = true FloatingBtn.Visible = false end end) -- Main Search Box local SearchBox = Instance.new("TextBox") SearchBox.Size = UDim2.new(0.92, 0, 0, 22) SearchBox.Position = UDim2.new(0.04, 0, 0, 34) SearchBox.BackgroundColor3 = Color3.fromRGB(25, 22, 35) SearchBox.BackgroundTransparency = 0.4 SearchBox.PlaceholderText = t("search") SearchBox.PlaceholderColor3 = Color3.fromRGB(140, 130, 160) SearchBox.Text = "" SearchBox.TextColor3 = Color3.fromRGB(255, 255, 255) SearchBox.TextSize = 9.5 SearchBox.Font = Enum.Font.Gotham SearchBox.Parent = MainFrame local SearchCorner = Instance.new("UICorner") SearchCorner.CornerRadius = UDim.new(0, 4) SearchCorner.Parent = SearchBox -- Containers Frame local ContainerFrame = Instance.new("Frame") ContainerFrame.Size = UDim2.new(0.92, 0, 1, -100) ContainerFrame.Position = UDim2.new(0.04, 0, 0, 60) ContainerFrame.BackgroundTransparency = 1 ContainerFrame.Parent = MainFrame -- Scrollable List inside Container local ScrollFrame = Instance.new("ScrollingFrame") ScrollFrame.Size = UDim2.new(1, 0, 1, 0) ScrollFrame.Position = UDim2.new(0, 0, 0, 0) ScrollFrame.BackgroundTransparency = 1 ScrollFrame.BorderSizePixel = 0 ScrollFrame.ScrollBarThickness = 2.5 ScrollFrame.ScrollBarImageColor3 = Color3.fromRGB(138, 43, 226) ScrollFrame.Parent = ContainerFrame local UIListLayout = Instance.new("UIListLayout") UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder UIListLayout.Padding = UDim.new(0, 4) UIListLayout.Parent = ScrollFrame -- User Profile Info & Language Selector (Bottom Left Corner) local UserInfoFrame = Instance.new("Frame") UserInfoFrame.Size = UDim2.new(0.92, 0, 0, 30) UserInfoFrame.Position = UDim2.new(0.04, 0, 1, -36) UserInfoFrame.BackgroundColor3 = Color3.fromRGB(22, 18, 32) UserInfoFrame.BackgroundTransparency = 0.4 UserInfoFrame.BorderSizePixel = 0 UserInfoFrame.Parent = MainFrame local UserInfoCorner = Instance.new("UICorner") UserInfoCorner.CornerRadius = UDim.new(0, 5) UserInfoCorner.Parent = UserInfoFrame local AvatarImg = Instance.new("ImageLabel") AvatarImg.Size = UDim2.new(0, 20, 0, 20) AvatarImg.Position = UDim2.new(0, 4, 0.5, -10) AvatarImg.BackgroundColor3 = Color3.fromRGB(35, 30, 48) AvatarImg.Parent = UserInfoFrame local AvatarCorner = Instance.new("UICorner") AvatarCorner.CornerRadius = UDim.new(0, 10) AvatarCorner.Parent = AvatarImg pcall(function() local content = Players:GetUserThumbnailAsync(LocalPlayer.UserId, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size150x150) AvatarImg.Image = content end) local DisplayNameLabel = Instance.new("TextLabel") DisplayNameLabel.Size = UDim2.new(0.5, 0, 0.45, 0) DisplayNameLabel.Position = UDim2.new(0, 28, 0, 3) DisplayNameLabel.BackgroundTransparency = 1 DisplayNameLabel.Text = LocalPlayer.DisplayName DisplayNameLabel.TextColor3 = Color3.fromRGB(255, 255, 255) DisplayNameLabel.TextSize = 9 DisplayNameLabel.Font = Enum.Font.GothamBold DisplayNameLabel.TextXAlignment = Enum.TextXAlignment.Left DisplayNameLabel.Parent = UserInfoFrame local UsernameLabel = Instance.new("TextLabel") UsernameLabel.Size = UDim2.new(0.5, 0, 0.45, 0) UsernameLabel.Position = UDim2.new(0, 28, 0, 14) UsernameLabel.BackgroundTransparency = 1 UsernameLabel.Text = "@" .. LocalPlayer.Name UsernameLabel.TextColor3 = Color3.fromRGB(160, 150, 180) UsernameLabel.TextSize = 8 UsernameLabel.Font = Enum.Font.Gotham UsernameLabel.TextXAlignment = Enum.TextXAlignment.Left UsernameLabel.Parent = UserInfoFrame -- زر تبديل اللغة local LangBtn = Instance.new("TextButton") LangBtn.Size = UDim2.new(0, 85, 0, 20) LangBtn.Position = UDim2.new(1, -88, 0.5, -10) LangBtn.BackgroundColor3 = Color3.fromRGB(45, 40, 60) LangBtn.Text = translations[currentLang].activeLangText LangBtn.TextColor3 = Color3.fromRGB(255, 255, 255) LangBtn.TextSize = 8.5 LangBtn.Font = Enum.Font.GothamBold LangBtn.Parent = UserInfoFrame local LangCorner = Instance.new("UICorner") LangCorner.CornerRadius = UDim.new(0, 4) LangCorner.Parent = LangBtn -- قائمة اللغات المنسدلة للأعلى local LangDropdown = Instance.new("Frame") LangDropdown.Size = UDim2.new(0, 85, 0, 68) LangDropdown.Position = UDim2.new(0, 0, 0, -72) LangDropdown.BackgroundColor3 = Color3.fromRGB(25, 22, 35) LangDropdown.BackgroundTransparency = 0.1 LangDropdown.Visible = false LangDropdown.ZIndex = 30 LangDropdown.Parent = LangBtn local LDCorner = Instance.new("UICorner") LDCorner.CornerRadius = UDim.new(0, 4) LDCorner.Parent = LangDropdown local LDLayout = Instance.new("UIListLayout") LDLayout.SortOrder = Enum.SortOrder.LayoutOrder LDLayout.Padding = UDim.new(0, 2) LDLayout.Parent = LangDropdown local languagesList = { {code = "ar", text = "العربية 🇸🇦"}, {code = "en", text = "English 🇺🇸"}, {code = "ru", text = "Русский 🇷🇺"}, {code = "zh", text = "中文 🇨🇳"} } local renderView LangBtn.MouseButton1Click:Connect(function() LangDropdown.Visible = not LangDropdown.Visible end) for _, lData in ipairs(languagesList) do local lOption = Instance.new("TextButton") lOption.Size = UDim2.new(1, 0, 0, 16) lOption.BackgroundColor3 = Color3.fromRGB(35, 30, 48) lOption.Text = lData.text lOption.TextColor3 = Color3.fromRGB(255, 255, 255) lOption.TextSize = 8 lOption.Font = Enum.Font.Gotham lOption.ZIndex = 31 lOption.Parent = LangDropdown local LOCorner = Instance.new("UICorner") LOCorner.CornerRadius = UDim.new(0, 3) LOCorner.Parent = lOption lOption.MouseButton1Click:Connect(function() currentLang = lData.code LangBtn.Text = translations[currentLang].activeLangText LangDropdown.Visible = false SearchBox.PlaceholderText = t("search") if #foldersList > 0 then foldersList[1].name = t("defaultFolderName") end if renderView then renderView(SearchBox.Text) end end) end -- Modal Dialog Component local function createModal(titleText, bodyText, onConfirm) local ModalOverlay = Instance.new("Frame") ModalOverlay.Size = UDim2.new(1, 0, 1, 0) ModalOverlay.BackgroundColor3 = Color3.fromRGB(0, 0, 0) ModalOverlay.BackgroundTransparency = 0.5 ModalOverlay.ZIndex = 200 ModalOverlay.Parent = MainFrame local ModalBox = Instance.new("Frame") ModalBox.Size = UDim2.new(0, 200, 0, 100) ModalBox.Position = UDim2.new(0.5, -100, 0.5, -50) ModalBox.BackgroundColor3 = Color3.fromRGB(25, 22, 35) ModalBox.ZIndex = 201 ModalBox.Parent = ModalOverlay local MCorner = Instance.new("UICorner") MCorner.CornerRadius = UDim.new(0, 5) MCorner.Parent = ModalBox local MTitle = Instance.new("TextLabel") MTitle.Size = UDim2.new(1, 0, 0, 22) MTitle.BackgroundTransparency = 1 MTitle.Text = titleText MTitle.TextColor3 = Color3.fromRGB(255, 255, 255) MTitle.TextSize = 11 MTitle.Font = Enum.Font.GothamBold MTitle.ZIndex = 201 MTitle.Parent = ModalBox local MText = Instance.new("TextLabel") MText.Size = UDim2.new(0.9, 0, 0, 30) MText.Position = UDim2.new(0.05, 0, 0, 25) MText.BackgroundTransparency = 1 MText.Text = bodyText MText.TextColor3 = Color3.fromRGB(200, 190, 210) MText.TextSize = 9.5 MText.TextWrapped = true MText.Font = Enum.Font.Gotham MText.ZIndex = 201 MText.Parent = ModalBox local YesBtn = Instance.new("TextButton") YesBtn.Size = UDim2.new(0.4, 0, 0, 22) YesBtn.Position = UDim2.new(0.08, 0, 0, 66) YesBtn.BackgroundColor3 = Color3.fromRGB(180, 40, 50) YesBtn.Text = t("yes") YesBtn.TextColor3 = Color3.fromRGB(255, 255, 255) YesBtn.Font = Enum.Font.GothamBold YesBtn.TextSize = 11 YesBtn.ZIndex = 201 YesBtn.Parent = ModalBox local YCorner = Instance.new("UICorner") YCorner.CornerRadius = UDim.new(0, 4) YCorner.Parent = YesBtn local NoBtn = Instance.new("TextButton") NoBtn.Size = UDim2.new(0.4, 0, 0, 22) NoBtn.Position = UDim2.new(0.52, 0, 0, 66) NoBtn.BackgroundColor3 = Color3.fromRGB(50, 45, 65) NoBtn.Text = t("no") NoBtn.TextColor3 = Color3.fromRGB(255, 255, 255) NoBtn.Font = Enum.Font.GothamBold NoBtn.TextSize = 11 NoBtn.ZIndex = 201 NoBtn.Parent = ModalBox local NCorner = Instance.new("UICorner") NCorner.CornerRadius = UDim.new(0, 4) NCorner.Parent = NoBtn YesBtn.MouseButton1Click:Connect(function() ModalOverlay:Destroy() onConfirm() end) NoBtn.MouseButton1Click:Connect(function() ModalOverlay:Destroy() end) end -- Prompt for Folder creation local function createFolderPrompt() local ModalOverlay = Instance.new("Frame") ModalOverlay.Size = UDim2.new(1, 0, 1, 0) ModalOverlay.BackgroundColor3 = Color3.fromRGB(0, 0, 0) ModalOverlay.BackgroundTransparency = 0.5 ModalOverlay.ZIndex = 200 ModalOverlay.Parent = MainFrame local ModalBox = Instance.new("Frame") ModalBox.Size = UDim2.new(0, 220, 0, 115) ModalBox.Position = UDim2.new(0.5, -110, 0.5, -57) ModalBox.BackgroundColor3 = Color3.fromRGB(25, 22, 35) ModalBox.ZIndex = 201 ModalBox.Parent = ModalOverlay local MCorner = Instance.new("UICorner") MCorner.CornerRadius = UDim.new(0, 6) MCorner.Parent = ModalBox local MTitle = Instance.new("TextLabel") MTitle.Size = UDim2.new(1, 0, 0, 24) MTitle.BackgroundTransparency = 1 MTitle.Text = t("createFolderTitle") MTitle.TextColor3 = Color3.fromRGB(255, 255, 255) MTitle.TextSize = 11 MTitle.Font = Enum.Font.GothamBold MTitle.ZIndex = 201 MTitle.Parent = ModalBox local FolderInput = Instance.new("TextBox") FolderInput.Size = UDim2.new(0.9, 0, 0, 26) FolderInput.Position = UDim2.new(0.05, 0, 0, 32) FolderInput.BackgroundColor3 = Color3.fromRGB(35, 30, 48) FolderInput.PlaceholderText = t("folderInputPlaceholder") FolderInput.PlaceholderColor3 = Color3.fromRGB(140, 130, 160) FolderInput.Text = "" FolderInput.TextColor3 = Color3.fromRGB(255, 255, 255) FolderInput.TextSize = 10 FolderInput.Font = Enum.Font.Gotham FolderInput.ZIndex = 201 FolderInput.Parent = ModalBox local FICorner = Instance.new("UICorner") FICorner.CornerRadius = UDim.new(0, 4) FICorner.Parent = FolderInput local CreateBtn = Instance.new("TextButton") CreateBtn.Size = UDim2.new(0.4, 0, 0, 24) CreateBtn.Position = UDim2.new(0.08, 0, 0, 75) CreateBtn.BackgroundColor3 = Color3.fromRGB(138, 43, 226) CreateBtn.Text = t("createBtn") CreateBtn.TextColor3 = Color3.fromRGB(255, 255, 255) CreateBtn.Font = Enum.Font.GothamBold CreateBtn.TextSize = 10 CreateBtn.ZIndex = 201 CreateBtn.Parent = ModalBox local CCorner = Instance.new("UICorner") CCorner.CornerRadius = UDim.new(0, 4) CCorner.Parent = CreateBtn local CancelBtn = Instance.new("TextButton") CancelBtn.Size = UDim2.new(0.4, 0, 0, 24) CancelBtn.Position = UDim2.new(0.52, 0, 0, 75) CancelBtn.BackgroundColor3 = Color3.fromRGB(50, 45, 65) CancelBtn.Text = t("cancelBtn") CancelBtn.TextColor3 = Color3.fromRGB(255, 255, 255) CancelBtn.Font = Enum.Font.GothamBold CancelBtn.TextSize = 10 CancelBtn.ZIndex = 201 CancelBtn.Parent = ModalBox local CancelCorner = Instance.new("UICorner") CancelCorner.CornerRadius = UDim.new(0, 4) CancelCorner.Parent = CancelBtn CreateBtn.MouseButton1Click:Connect(function() if FolderInput.Text ~= "" then table.insert(foldersList, {name = FolderInput.Text, songs = {}}) saveData() ModalOverlay:Destroy() renderView(SearchBox.Text) end end) CancelBtn.MouseButton1Click:Connect(function() ModalOverlay:Destroy() end) end -- Prompt for Editing Folder Name local function editFolderPrompt(folderIndex) if folderIndex == 1 then return end local folder = foldersList[folderIndex] local ModalOverlay = Instance.new("Frame") ModalOverlay.Size = UDim2.new(1, 0, 1, 0) ModalOverlay.BackgroundColor3 = Color3.fromRGB(0, 0, 0) ModalOverlay.BackgroundTransparency = 0.5 ModalOverlay.ZIndex = 200 ModalOverlay.Parent = MainFrame local ModalBox = Instance.new("Frame") ModalBox.Size = UDim2.new(0, 220, 0, 115) ModalBox.Position = UDim2.new(0.5, -110, 0.5, -57) ModalBox.BackgroundColor3 = Color3.fromRGB(25, 22, 35) ModalBox.ZIndex = 201 ModalBox.Parent = ModalOverlay local MCorner = Instance.new("UICorner") MCorner.CornerRadius = UDim.new(0, 6) MCorner.Parent = ModalBox local MTitle = Instance.new("TextLabel") MTitle.Size = UDim2.new(1, 0, 0, 24) MTitle.BackgroundTransparency = 1 MTitle.Text = t("editFolderTitle") MTitle.TextColor3 = Color3.fromRGB(255, 255, 255) MTitle.TextSize = 11 MTitle.Font = Enum.Font.GothamBold MTitle.ZIndex = 201 MTitle.Parent = ModalBox local FolderInput = Instance.new("TextBox") FolderInput.Size = UDim2.new(0.9, 0, 0, 26) FolderInput.Position = UDim2.new(0.05, 0, 0, 32) FolderInput.BackgroundColor3 = Color3.fromRGB(35, 30, 48) FolderInput.PlaceholderText = t("folderInputPlaceholder") FolderInput.PlaceholderColor3 = Color3.fromRGB(140, 130, 160) FolderInput.Text = folder.name FolderInput.TextColor3 = Color3.fromRGB(255, 255, 255) FolderInput.TextSize = 10 FolderInput.Font = Enum.Font.Gotham FolderInput.ZIndex = 201 FolderInput.Parent = ModalBox local FICorner = Instance.new("UICorner") FICorner.CornerRadius = UDim.new(0, 4) FICorner.Parent = FolderInput local SaveBtn = Instance.new("TextButton") SaveBtn.Size = UDim2.new(0.4, 0, 0, 24) SaveBtn.Position = UDim2.new(0.08, 0, 0, 75) SaveBtn.BackgroundColor3 = Color3.fromRGB(138, 43, 226) SaveBtn.Text = t("saveBtn") SaveBtn.TextColor3 = Color3.fromRGB(255, 255, 255) SaveBtn.Font = Enum.Font.GothamBold SaveBtn.TextSize = 10 SaveBtn.ZIndex = 201 SaveBtn.Parent = ModalBox local SCorner = Instance.new("UICorner") SCorner.CornerRadius = UDim.new(0, 4) SCorner.Parent = SaveBtn local CancelBtn = Instance.new("TextButton") CancelBtn.Size = UDim2.new(0.4, 0, 0, 24) CancelBtn.Position = UDim2.new(0.52, 0, 0, 75) CancelBtn.BackgroundColor3 = Color3.fromRGB(50, 45, 65) CancelBtn.Text = t("cancelBtn") CancelBtn.TextColor3 = Color3.fromRGB(255, 255, 255) CancelBtn.Font = Enum.Font.GothamBold CancelBtn.TextSize = 10 CancelBtn.ZIndex = 201 CancelBtn.Parent = ModalBox local CancelCorner = Instance.new("UICorner") CancelCorner.CornerRadius = UDim.new(0, 4) CancelCorner.Parent = CancelBtn SaveBtn.MouseButton1Click:Connect(function() if FolderInput.Text ~= "" then foldersList[folderIndex].name = FolderInput.Text saveData() ModalOverlay:Destroy() renderView(SearchBox.Text) end end) CancelBtn.MouseButton1Click:Connect(function() ModalOverlay:Destroy() end) end -- Prompt for Editing Song Name local function editSongPrompt(folderIndex, songIndex) local song = foldersList[folderIndex].songs[songIndex] local ModalOverlay = Instance.new("Frame") ModalOverlay.Size = UDim2.new(1, 0, 1, 0) ModalOverlay.BackgroundColor3 = Color3.fromRGB(0, 0, 0) ModalOverlay.BackgroundTransparency = 0.5 ModalOverlay.ZIndex = 200 ModalOverlay.Parent = MainFrame local ModalBox = Instance.new("Frame") ModalBox.Size = UDim2.new(0, 240, 0, 140) ModalBox.Position = UDim2.new(0.5, -120, 0.5, -70) ModalBox.BackgroundColor3 = Color3.fromRGB(25, 22, 35) ModalBox.ZIndex = 201 ModalBox.Parent = ModalOverlay local MCorner = Instance.new("UICorner") MCorner.CornerRadius = UDim.new(0, 6) MCorner.Parent = ModalBox local MTitle = Instance.new("TextLabel") MTitle.Size = UDim2.new(1, 0, 0, 24) MTitle.BackgroundTransparency = 1 MTitle.Text = t("editSongTitle") MTitle.TextColor3 = Color3.fromRGB(255, 255, 255) MTitle.TextSize = 11 MTitle.Font = Enum.Font.GothamBold MTitle.ZIndex = 201 MTitle.Parent = ModalBox local NameInput = Instance.new("TextBox") NameInput.Size = UDim2.new(0.9, 0, 0, 26) NameInput.Position = UDim2.new(0.05, 0, 0, 30) NameInput.BackgroundColor3 = Color3.fromRGB(35, 30, 48) NameInput.PlaceholderText = t("songNamePlaceholder") NameInput.PlaceholderColor3 = Color3.fromRGB(140, 130, 160) NameInput.Text = song.name NameInput.TextColor3 = Color3.fromRGB(255, 255, 255) NameInput.TextSize = 10 NameInput.Font = Enum.Font.Gotham NameInput.ZIndex = 201 NameInput.Parent = ModalBox local NCorner = Instance.new("UICorner") NCorner.CornerRadius = UDim.new(0, 4) NCorner.Parent = NameInput local CodeInput = Instance.new("TextBox") CodeInput.Size = UDim2.new(0.9, 0, 0, 26) CodeInput.Position = UDim2.new(0.05, 0, 0, 62) CodeInput.BackgroundColor3 = Color3.fromRGB(35, 30, 48) CodeInput.PlaceholderText = t("songIdPlaceholder") CodeInput.PlaceholderColor3 = Color3.fromRGB(140, 130, 160) CodeInput.Text = song.code CodeInput.TextColor3 = Color3.fromRGB(255, 255, 255) CodeInput.TextSize = 10 CodeInput.Font = Enum.Font.Gotham CodeInput.ZIndex = 201 CodeInput.Parent = ModalBox local CCorner = Instance.new("UICorner") CCorner.CornerRadius = UDim.new(0, 4) CCorner.Parent = CodeInput local SaveBtn = Instance.new("TextButton") SaveBtn.Size = UDim2.new(0.4, 0, 0, 24) SaveBtn.Position = UDim2.new(0.08, 0, 0, 102) SaveBtn.BackgroundColor3 = Color3.fromRGB(138, 43, 226) SaveBtn.Text = t("saveBtn") SaveBtn.TextColor3 = Color3.fromRGB(255, 255, 255) SaveBtn.Font = Enum.Font.GothamBold SaveBtn.TextSize = 10 SaveBtn.ZIndex = 201 SaveBtn.Parent = ModalBox local SCorner = Instance.new("UICorner") SCorner.CornerRadius = UDim.new(0, 4) SCorner.Parent = SaveBtn local CancelBtn = Instance.new("TextButton") CancelBtn.Size = UDim2.new(0.4, 0, 0, 24) CancelBtn.Position = UDim2.new(0.52, 0, 0, 102) CancelBtn.BackgroundColor3 = Color3.fromRGB(50, 45, 65) CancelBtn.Text = t("cancelBtn") CancelBtn.TextColor3 = Color3.fromRGB(255, 255, 255) CancelBtn.Font = Enum.Font.GothamBold CancelBtn.TextSize = 10 CancelBtn.ZIndex = 201 CancelBtn.Parent = ModalBox local CancelCorner = Instance.new("UICorner") CancelCorner.CornerRadius = UDim.new(0, 4) CancelCorner.Parent = CancelBtn SaveBtn.MouseButton1Click:Connect(function() if NameInput.Text ~= "" and CodeInput.Text ~= "" then foldersList[folderIndex].songs[songIndex].name = NameInput.Text foldersList[folderIndex].songs[songIndex].code = CodeInput.Text saveData() ModalOverlay:Destroy() renderView(SearchBox.Text) end end) CancelBtn.MouseButton1Click:Connect(function() ModalOverlay:Destroy() end) end -- Prompt for Adding Song local function createSongPrompt() local ModalOverlay = Instance.new("Frame") ModalOverlay.Size = UDim2.new(1, 0, 1, 0) ModalOverlay.BackgroundColor3 = Color3.fromRGB(0, 0, 0) ModalOverlay.BackgroundTransparency = 0.5 ModalOverlay.ZIndex = 200 ModalOverlay.Parent = MainFrame local ModalBox = Instance.new("Frame") ModalBox.Size = UDim2.new(0, 240, 0, 195) ModalBox.Position = UDim2.new(0.5, -120, 0.5, -97) ModalBox.BackgroundColor3 = Color3.fromRGB(25, 22, 35) ModalBox.ZIndex = 201 ModalBox.Parent = ModalOverlay local MCorner = Instance.new("UICorner") MCorner.CornerRadius = UDim.new(0, 6) MCorner.Parent = ModalBox local MTitle = Instance.new("TextLabel") MTitle.Size = UDim2.new(1, 0, 0, 24) MTitle.BackgroundTransparency = 1 MTitle.Text = t("addSongTitle") MTitle.TextColor3 = Color3.fromRGB(255, 255, 255) MTitle.TextSize = 11 MTitle.Font = Enum.Font.GothamBold MTitle.ZIndex = 201 MTitle.Parent = ModalBox local NameInput = Instance.new("TextBox") NameInput.Size = UDim2.new(0.9, 0, 0, 24) NameInput.Position = UDim2.new(0.05, 0, 0, 30) NameInput.BackgroundColor3 = Color3.fromRGB(35, 30, 48) NameInput.PlaceholderText = t("songNamePlaceholder") NameInput.PlaceholderColor3 = Color3.fromRGB(140, 130, 160) NameInput.Text = "" NameInput.TextColor3 = Color3.fromRGB(255, 255, 255) NameInput.TextSize = 10 NameInput.Font = Enum.Font.Gotham NameInput.ZIndex = 201 NameInput.Parent = ModalBox local NCorner = Instance.new("UICorner") NCorner.CornerRadius = UDim.new(0, 4) NCorner.Parent = NameInput local CodeInput = Instance.new("TextBox") CodeInput.Size = UDim2.new(0.9, 0, 0, 24) CodeInput.Position = UDim2.new(0.05, 0, 0, 58) CodeInput.BackgroundColor3 = Color3.fromRGB(35, 30, 48) CodeInput.PlaceholderText = t("songIdPlaceholder") CodeInput.PlaceholderColor3 = Color3.fromRGB(140, 130, 160) CodeInput.Text = "" CodeInput.TextColor3 = Color3.fromRGB(255, 255, 255) CodeInput.TextSize = 10 CodeInput.Font = Enum.Font.Gotham CodeInput.ZIndex = 201 CodeInput.Parent = ModalBox local CCorner = Instance.new("UICorner") CCorner.CornerRadius = UDim.new(0, 4) CCorner.Parent = CodeInput local chosenFolderIdx = 1 local SelectFolderBtn = Instance.new("TextButton") SelectFolderBtn.Size = UDim2.new(0.9, 0, 0, 24) SelectFolderBtn.Position = UDim2.new(0.05, 0, 0, 86) SelectFolderBtn.BackgroundColor3 = Color3.fromRGB(45, 40, 60) SelectFolderBtn.Text = "📁 Folder: " .. foldersList[1].name SelectFolderBtn.TextColor3 = Color3.fromRGB(255, 255, 255) SelectFolderBtn.Font = Enum.Font.Gotham SelectFolderBtn.TextSize = 10 SelectFolderBtn.ZIndex = 201 SelectFolderBtn.Parent = ModalBox local SFCorner = Instance.new("UICorner") SFCorner.CornerRadius = UDim.new(0, 4) SFCorner.Parent = SelectFolderBtn SelectFolderBtn.MouseButton1Click:Connect(function() chosenFolderIdx = chosenFolderIdx + 1 if chosenFolderIdx > #foldersList then chosenFolderIdx = 1 end SelectFolderBtn.Text = "📁 Folder: " .. foldersList[chosenFolderIdx].name end) local SaveBtn = Instance.new("TextButton") SaveBtn.Size = UDim2.new(0.4, 0, 0, 24) SaveBtn.Position = UDim2.new(0.08, 0, 0, 122) SaveBtn.BackgroundColor3 = Color3.fromRGB(138, 43, 226) SaveBtn.Text = t("saveBtn") SaveBtn.TextColor3 = Color3.fromRGB(255, 255, 255) SaveBtn.Font = Enum.Font.GothamBold SaveBtn.TextSize = 10 SaveBtn.ZIndex = 201 SaveBtn.Parent = ModalBox local SCorner = Instance.new("UICorner") SCorner.CornerRadius = UDim.new(0, 4) SCorner.Parent = SaveBtn local CancelBtn = Instance.new("TextButton") CancelBtn.Size = UDim2.new(0.4, 0, 0, 24) CancelBtn.Position = UDim2.new(0.52, 0, 0, 122) CancelBtn.BackgroundColor3 = Color3.fromRGB(50, 45, 65) CancelBtn.Text = t("cancelBtn") CancelBtn.TextColor3 = Color3.fromRGB(255, 255, 255) CancelBtn.Font = Enum.Font.GothamBold CancelBtn.TextSize = 10 CancelBtn.ZIndex = 201 CancelBtn.Parent = ModalBox local CancelCorner = Instance.new("UICorner") CancelCorner.CornerRadius = UDim.new(0, 4) CancelCorner.Parent = CancelBtn SaveBtn.MouseButton1Click:Connect(function() if NameInput.Text ~= "" and CodeInput.Text ~= "" then table.insert(foldersList[chosenFolderIdx].songs, {name = NameInput.Text, code = CodeInput.Text}) saveData() ModalOverlay:Destroy() renderView(SearchBox.Text) end end) CancelBtn.MouseButton1Click:Connect(function() ModalOverlay:Destroy() end) end -- Navigation States local currentView = "folders" local activeFolderIndex = nil renderView = function(filter) filter = filter and filter:lower() or "" activePlayButtons = {} for _, child in ipairs(ScrollFrame:GetChildren()) do if child:IsA("Frame") then child:Destroy() end end if filter ~= "" then for fIdx, folder in ipairs(foldersList) do for sIdx, item in ipairs(folder.songs) do if item.name:lower():find(filter, 1, true) or item.code:find(filter, 1, true) or folder.name:lower():find(filter, 1, true) then local cleanId = item.code:match("%d+") or "" local ItemFrame = Instance.new("Frame") ItemFrame.Size = UDim2.new(1, 0, 0, 32) ItemFrame.BackgroundColor3 = Color3.fromRGB(22, 18, 32) ItemFrame.BackgroundTransparency = 0.4 ItemFrame.Parent = ScrollFrame local ICorner = Instance.new("UICorner") ICorner.CornerRadius = UDim.new(0, 4) ICorner.Parent = ItemFrame local ItemName = Instance.new("TextLabel") ItemName.Size = UDim2.new(0.4, 0, 0.45, 0) ItemName.Position = UDim2.new(0.03, 0, 0.08, 0) ItemName.BackgroundTransparency = 1 ItemName.Text = item.name .. " (" .. folder.name .. ")" ItemName.TextColor3 = Color3.fromRGB(255, 255, 255) ItemName.TextSize = 9 ItemName.Font = Enum.Font.GothamBold ItemName.TextXAlignment = Enum.TextXAlignment.Left ItemName.Parent = ItemFrame local ItemCode = Instance.new("TextLabel") ItemCode.Size = UDim2.new(0.4, 0, 0.45, 0) ItemCode.Position = UDim2.new(0.03, 0, 0.5, 0) ItemCode.BackgroundTransparency = 1 ItemCode.Text = "ID: " .. item.code ItemCode.TextColor3 = Color3.fromRGB(160, 150, 180) ItemCode.TextSize = 8 ItemCode.Font = Enum.Font.Gotham ItemCode.TextXAlignment = Enum.TextXAlignment.Left ItemCode.Parent = ItemFrame local CopyBtn = Instance.new("TextButton") CopyBtn.Size = UDim2.new(0, 18, 0, 20) CopyBtn.Position = UDim2.new(1, -87, 0.5, -10) CopyBtn.BackgroundColor3 = Color3.fromRGB(45, 40, 60) CopyBtn.Text = "📋" CopyBtn.TextSize = 8.5 CopyBtn.Parent = ItemFrame local CCorner = Instance.new("UICorner") CCorner.CornerRadius = UDim.new(0, 3) CCorner.Parent = CopyBtn local PlayStopBtn = Instance.new("TextButton") PlayStopBtn.Size = UDim2.new(0, 18, 0, 20) PlayStopBtn.Position = UDim2.new(1, -66, 0.5, -10) if currentPlayingCode == cleanId then PlayStopBtn.Text = "⏹" PlayStopBtn.BackgroundColor3 = Color3.fromRGB(210, 140, 0) else PlayStopBtn.Text = "▶" PlayStopBtn.BackgroundColor3 = Color3.fromRGB(138, 43, 226) end PlayStopBtn.TextColor3 = Color3.fromRGB(255, 255, 255) PlayStopBtn.TextSize = 8.5 PlayStopBtn.Parent = ItemFrame activePlayButtons[cleanId] = {Button = PlayStopBtn, Code = cleanId} local PSCorner = Instance.new("UICorner") PSCorner.CornerRadius = UDim.new(0, 3) PSCorner.Parent = PlayStopBtn local EditSongBtn = Instance.new("TextButton") EditSongBtn.Size = UDim2.new(0, 18, 0, 20) EditSongBtn.Position = UDim2.new(1, -44, 0.5, -10) EditSongBtn.BackgroundColor3 = Color3.fromRGB(70, 50, 100) EditSongBtn.Text = "✏️" EditSongBtn.TextSize = 8.5 EditSongBtn.Parent = ItemFrame local ESCorner = Instance.new("UICorner") ESCorner.CornerRadius = UDim.new(0, 3) ESCorner.Parent = EditSongBtn local DeleteBtn = Instance.new("TextButton") DeleteBtn.Size = UDim2.new(0, 18, 0, 20) DeleteBtn.Position = UDim2.new(1, -22, 0.5, -10) DeleteBtn.BackgroundColor3 = Color3.fromRGB(180, 40, 50) DeleteBtn.Text = "🗑" DeleteBtn.TextSize = 8.5 DeleteBtn.Parent = ItemFrame local DCorner = Instance.new("UICorner") DCorner.CornerRadius = UDim.new(0, 3) DCorner.Parent = DeleteBtn CopyBtn.MouseButton1Click:Connect(function() if setclipboard then setclipboard(item.code) end end) PlayStopBtn.MouseButton1Click:Connect(function() playAudio(item.code, PlayStopBtn) end) EditSongBtn.MouseButton1Click:Connect(function() editSongPrompt(fIdx, sIdx) end) DeleteBtn.MouseButton1Click:Connect(function() createModal(t("modalDeleteTitle"), t("modalDeleteSong"), function() table.remove(foldersList[fIdx].songs, sIdx) saveData() renderView(SearchBox.Text) end) end) end end end ScrollFrame.CanvasSize = UDim2.new(0, 0, 0, UIListLayout.AbsoluteContentSize.Y + 10) return end if currentView == "folders" then local TopActions = Instance.new("Frame") TopActions.Size = UDim2.new(1, 0, 0, 24) TopActions.BackgroundTransparency = 1 TopActions.Parent = ScrollFrame local AddFolderBtn = Instance.new("TextButton") AddFolderBtn.Size = UDim2.new(0.48, 0, 1, 0) AddFolderBtn.Position = UDim2.new(0, 0, 0, 0) AddFolderBtn.BackgroundColor3 = Color3.fromRGB(138, 43, 226) AddFolderBtn.Text = t("newFolder") AddFolderBtn.TextColor3 = Color3.fromRGB(255, 255, 255) AddFolderBtn.TextSize = 9 AddFolderBtn.Font = Enum.Font.GothamBold AddFolderBtn.Parent = TopActions local AFC = Instance.new("UICorner") AFC.CornerRadius = UDim.new(0, 4) AFC.Parent = AddFolderBtn local AddSongGlobalBtn = Instance.new("TextButton") AddSongGlobalBtn.Size = UDim2.new(0.48, 0, 1, 0) AddSongGlobalBtn.Position = UDim2.new(0.52, 0, 0, 0) AddSongGlobalBtn.BackgroundColor3 = Color3.fromRGB(45, 40, 60) AddSongGlobalBtn.Text = t("addSong") AddSongGlobalBtn.TextColor3 = Color3.fromRGB(255, 255, 255) AddSongGlobalBtn.TextSize = 9 AddSongGlobalBtn.Font = Enum.Font.GothamBold AddSongGlobalBtn.Parent = TopActions local ASGC = Instance.new("UICorner") ASGC.CornerRadius = UDim.new(0, 4) ASGC.Parent = AddSongGlobalBtn AddFolderBtn.MouseButton1Click:Connect(function() createFolderPrompt() end) AddSongGlobalBtn.MouseButton1Click:Connect(function() createSongPrompt() end) for index, folder in ipairs(foldersList) do local FolderFrame = Instance.new("Frame") FolderFrame.Size = UDim2.new(1, 0, 0, 32) if index == 1 then FolderFrame.BackgroundColor3 = Color3.fromRGB(60, 25, 95) else FolderFrame.BackgroundColor3 = Color3.fromRGB(22, 18, 32) end FolderFrame.BackgroundTransparency = 0.3 FolderFrame.Parent = ScrollFrame local FCorner = Instance.new("UICorner") FCorner.CornerRadius = UDim.new(0, 5) FCorner.Parent = FolderFrame local FolderName = Instance.new("TextButton") local displayFolderName = (index == 1) and t("defaultFolderName") or folder.name FolderName.Size = UDim2.new(0.55, 0, 1, 0) FolderName.Position = UDim2.new(0.03, 0, 0, 0) FolderName.BackgroundTransparency = 1 FolderName.Text = "📁 " .. displayFolderName .. " (" .. #folder.songs .. ")" if index == 1 then FolderName.TextColor3 = Color3.fromRGB(255, 215, 0) else FolderName.TextColor3 = Color3.fromRGB(255, 255, 255) end FolderName.TextSize = 9.5 FolderName.Font = Enum.Font.GothamBold FolderName.TextXAlignment = Enum.TextXAlignment.Left FolderName.Parent = FolderFrame FolderName.MouseButton1Click:Connect(function() currentView = "folder_songs" activeFolderIndex = index renderView(SearchBox.Text) end) if index > 1 then local EditFolderBtn = Instance.new("TextButton") EditFolderBtn.Size = UDim2.new(0, 20, 0, 20) EditFolderBtn.Position = UDim2.new(1, -46, 0.5, -10) EditFolderBtn.BackgroundColor3 = Color3.fromRGB(70, 50, 100) EditFolderBtn.Text = "✏️" EditFolderBtn.TextSize = 8.5 EditFolderBtn.Parent = FolderFrame local EFC = Instance.new("UICorner") EFC.CornerRadius = UDim.new(0, 4) EFC.Parent = EditFolderBtn EditFolderBtn.MouseButton1Click:Connect(function() editFolderPrompt(index) end) local DelFolderBtn = Instance.new("TextButton") DelFolderBtn.Size = UDim2.new(0, 20, 0, 20) DelFolderBtn.Position = UDim2.new(1, -22, 0.5, -10) DelFolderBtn.BackgroundColor3 = Color3.fromRGB(180, 40, 50) DelFolderBtn.Text = "🗑" DelFolderBtn.TextSize = 8.5 DelFolderBtn.Parent = FolderFrame local DFC = Instance.new("UICorner") DFC.CornerRadius = UDim.new(0, 4) DFC.Parent = DelFolderBtn DelFolderBtn.MouseButton1Click:Connect(function() createModal(t("modalDeleteTitle"), t("modalDeleteFolder"), function() table.remove(foldersList, index) saveData() renderView(SearchBox.Text) end) end) end end elseif currentView == "folder_songs" and activeFolderIndex then local folder = foldersList[activeFolderIndex] local displayFolderName = (activeFolderIndex == 1) and t("defaultFolderName") or folder.name local FolderHeader = Instance.new("Frame") FolderHeader.Size = UDim2.new(1, 0, 0, 24) FolderHeader.BackgroundTransparency = 1 FolderHeader.Parent = ScrollFrame local BackBtn = Instance.new("TextButton") BackBtn.Size = UDim2.new(0, 60, 0, 22) BackBtn.Position = UDim2.new(0, 0, 0, 0) BackBtn.BackgroundColor3 = Color3.fromRGB(45, 40, 60) BackBtn.Text = t("back") BackBtn.TextColor3 = Color3.fromRGB(255, 255, 255) BackBtn.TextSize = 9 BackBtn.Font = Enum.Font.GothamBold BackBtn.Parent = FolderHeader local BC = Instance.new("UICorner") BC.CornerRadius = UDim.new(0, 4) BC.Parent = BackBtn local FTitleLbl = Instance.new("TextLabel") FTitleLbl.Size = UDim2.new(0.65, 0, 1, 0) FTitleLbl.Position = UDim2.new(0.35, 0, 0, 0) FTitleLbl.BackgroundTransparency = 1 FTitleLbl.Text = "📁 " .. displayFolderName FTitleLbl.TextColor3 = Color3.fromRGB(210, 180, 255) FTitleLbl.TextSize = 9.5 FTitleLbl.Font = Enum.Font.GothamBold FTitleLbl.TextXAlignment = Enum.TextXAlignment.Right FTitleLbl.Parent = FolderHeader BackBtn.MouseButton1Click:Connect(function() currentView = "folders" activeFolderIndex = nil renderView(SearchBox.Text) end) for index, item in ipairs(folder.songs) do local cleanId = item.code:match("%d+") or "" local ItemFrame = Instance.new("Frame") ItemFrame.Size = UDim2.new(1, 0, 0, 32) ItemFrame.BackgroundColor3 = Color3.fromRGB(22, 18, 32) ItemFrame.BackgroundTransparency = 0.4 ItemFrame.Parent = ScrollFrame local ICorner = Instance.new("UICorner") ICorner.CornerRadius = UDim.new(0, 4) ICorner.Parent = ItemFrame local ItemName = Instance.new("TextLabel") ItemName.Size = UDim2.new(0.4, 0, 0.45, 0) ItemName.Position = UDim2.new(0.03, 0, 0.08, 0) ItemName.BackgroundTransparency = 1 ItemName.Text = item.name ItemName.TextColor3 = Color3.fromRGB(255, 255, 255) ItemName.TextSize = 9 ItemName.Font = Enum.Font.GothamBold ItemName.TextXAlignment = Enum.TextXAlignment.Left ItemName.Parent = ItemFrame local ItemCode = Instance.new("TextLabel") ItemCode.Size = UDim2.new(0.4, 0, 0.45, 0) ItemCode.Position = UDim2.new(0.03, 0, 0.5, 0) ItemCode.BackgroundTransparency = 1 ItemCode.Text = "ID: " .. item.code ItemCode.TextColor3 = Color3.fromRGB(160, 150, 180) ItemCode.TextSize = 8 ItemCode.Font = Enum.Font.Gotham ItemCode.TextXAlignment = Enum.TextXAlignment.Left ItemCode.Parent = ItemFrame local CopyBtn = Instance.new("TextButton") CopyBtn.Size = UDim2.new(0, 18, 0, 20) CopyBtn.Position = UDim2.new(1, -87, 0.5, -10) CopyBtn.BackgroundColor3 = Color3.fromRGB(45, 40, 60) CopyBtn.Text = "📋" CopyBtn.TextSize = 8.5 CopyBtn.Parent = ItemFrame local CCorner = Instance.new("UICorner") CCorner.CornerRadius = UDim.new(0, 3) CCorner.Parent = CopyBtn local PlayStopBtn = Instance.new("TextButton") PlayStopBtn.Size = UDim2.new(0, 18, 0, 20) PlayStopBtn.Position = UDim2.new(1, -66, 0.5, -10) if currentPlayingCode == cleanId then PlayStopBtn.Text = "⏹" PlayStopBtn.BackgroundColor3 = Color3.fromRGB(210, 140, 0) else PlayStopBtn.Text = "▶" PlayStopBtn.BackgroundColor3 = Color3.fromRGB(138, 43, 226) end PlayStopBtn.TextColor3 = Color3.fromRGB(255, 255, 255) PlayStopBtn.TextSize = 8.5 PlayStopBtn.Parent = ItemFrame activePlayButtons[cleanId] = {Button = PlayStopBtn, Code = cleanId} local PSCorner = Instance.new("UICorner") PSCorner.CornerRadius = UDim.new(0, 3) PSCorner.Parent = PlayStopBtn local EditSongBtn = Instance.new("TextButton") EditSongBtn.Size = UDim2.new(0, 18, 0, 20) EditSongBtn.Position = UDim2.new(1, -44, 0.5, -10) EditSongBtn.BackgroundColor3 = Color3.fromRGB(70, 50, 100) EditSongBtn.Text = "✏️" EditSongBtn.TextSize = 8.5 EditSongBtn.Parent = ItemFrame local ESCorner = Instance.new("UICorner") ESCorner.CornerRadius = UDim.new(0, 3) ESCorner.Parent = EditSongBtn local DeleteBtn = Instance.new("TextButton") DeleteBtn.Size = UDim2.new(0, 18, 0, 20) DeleteBtn.Position = UDim2.new(1, -22, 0.5, -10) DeleteBtn.BackgroundColor3 = Color3.fromRGB(180, 40, 50) DeleteBtn.Text = "🗑" DeleteBtn.TextSize = 8.5 DeleteBtn.Parent = ItemFrame local DCorner = Instance.new("UICorner") DCorner.CornerRadius = UDim.new(0, 3) DCorner.Parent = DeleteBtn CopyBtn.MouseButton1Click:Connect(function() if setclipboard then setclipboard(item.code) end end) PlayStopBtn.MouseButton1Click:Connect(function() playAudio(item.code, PlayStopBtn) end) EditSongBtn.MouseButton1Click:Connect(function() editSongPrompt(activeFolderIndex, index) end) DeleteBtn.MouseButton1Click:Connect(function() createModal(t("modalDeleteTitle"), t("modalDeleteSong"), function() table.remove(folder.songs, index) saveData() renderView(SearchBox.Text) end) end) end end ScrollFrame.CanvasSize = UDim2.new(0, 0, 0, UIListLayout.AbsoluteContentSize.Y + 10) end SearchBox:GetPropertyChangedSignal("Text"):Connect(function() renderView(SearchBox.Text) end) MinimizeBtn.MouseButton1Click:Connect(function() MainFrame.Visible = false FloatingBtn.Visible = true end) CloseBtn.MouseButton1Click:Connect(function() createModal(t("modalDeleteTitle"), t("modalCloseScript"), function() stopAudio() ScreenGui:Destroy() end) end) renderView()