Universal Script 📌
3.2k Views
2.0k Executions

MP3 Player Music Controller

Universal Script 📌
Arspwtor
ArspwtorFirst script
8 months ago
Get an executor
Please login to perform these actions:

Does it work?

No reports yet

No reports yet. Tried it? Be the first to say.

Also noticed:

Description

**Features** Play, pause, skip, and go back between tracks. Adjust volume and playback speed with sliders. Enable repeat to loop a track or shuffle to randomize playback order. Tracks automatically crossfade into each other when one is ending. You can build a manual queue that plays before returning to the main list. Tracks are organized into categories you can create, rename, delete, and reorder. You can drag tracks into categories from the list panel. The script auto-scans a local folder for MP3 files and loads them. You can also add tracks using Roblox Sound IDs. Tracks can be renamed, reordered, or permanently deleted. Synced lyrics are fetched automatically from lrclib.net based on the track name, with a fallback to audio fingerprinting via audd.io. Instrumental tracks show a placeholder instead of lyrics. Lyrics can be auto-translated to English line by line. Cinematic mode adds black bars and displays lyrics in a movie-style overlay. A screen shake and FOV pulse effect reacts to the music's loudness, with adjustable intensity. You can search SoundCloud and add tracks directly from results. There is a built-in MP3 downloader tab. All other in-game sounds can be muted while music plays. All settings are saved to a JSON file and restored on next load. Keybinds for every action are fully customizable. The GUI can be toggled with a keybind (default N). Reverb, distortion, equalizer, and chorus sound effects are available per track. **Required Executor Functions** isfile, isfolder, makefolder, listfiles, readfile, writefile, delfile, getcustomasset, request, game:HttpGet, syn.crypt.base64.encode / crypt.base64encode

View Raw
local Svc={Pl=game:GetService("Players"),UIS=game:GetService("UserInputService"),SS=game:GetService("SoundService"),RS=game:GetService("RunService"),TS=game:GetService("TweenService"),RepS=game:GetService("ReplicatedStorage"),WS=game:GetService("Workspace"),MPS=game:GetService("MarketplaceService"),HS=game:GetService("HttpService"),Deb=game:GetService("Debris")}
local player=Svc.Pl.LocalPlayer;local pGui=player:WaitForChild("PlayerGui")
local C={BG=Color3.fromRGB(5,4,3),CARD_HI=Color3.fromRGB(26,20,10),CARD_LO=Color3.fromRGB(3,2,1),SURFACE=Color3.fromRGB(16,13,7),ELEVATED=Color3.fromRGB(30,24,12),BORDER=Color3.fromRGB(46,36,16),BORDER_LIT=Color3.fromRGB(148,114,42),ACCENT=Color3.fromRGB(208,164,68),ACCENT_DIM=Color3.fromRGB(86,64,20),TEXT=Color3.fromRGB(230,218,186),TEXT2=Color3.fromRGB(132,112,70),TEXT3=Color3.fromRGB(62,50,26),SUCCESS=Color3.fromRGB(72,190,110),DANGER=Color3.fromRGB(200,62,62),HANDLE=Color3.fromRGB(206,174,100)}
local AT=Color3.fromRGB(10,8,4)
local Cfg={workspacePath="Music Workspace/Musics",configsPath="Music Workspace/Configs",categoriesPath="Music Workspace/Configs/categories.json",soundIdsPath="Music Workspace/Configs/soundids.json",AUTO_SCAN_INTERVAL=2,CROSSFADE_TIME=1.0,CROSSFADE_TRIGGER=1.0,TRACK_SWITCH_COOLDOWN=1,CARD_WIDTH=380,BASE_HEIGHT=315,REVERB_EXTRA_HEIGHT=150,LIST_WIDTH=260,SLIDER_MIN=0,SLIDER_MAX=10,SNAP_VALUE=1,SNAP_THRESHOLD=0.25,SOUND_ID_CATEGORY_ID="__ROBLOX_SOUND_IDS__",SOUND_ID_CATEGORY_NAME="Roblox Sound ID's",ORDER_PATH="Music Workspace/Configs/order.json",SETTINGS_PATH="Music Workspace/Configs/settings.json",DNPATH="Music Workspace/Configs/displaynames.json",SHOH=58,TRH=28,TPCH=36,LG=12,RH=18,RG=4,FLAGGED_PATH="Music Workspace/Configs/flagged_instrumental.json"}
local St={currentVolume=1,currentSpeed=1,currentIncrement=0.1,crossfadeEnabled=true,repeatEnabled=false,shuffleEnabled=false,screenShakeEnabled=false,lyricsEnabled=false,currentTrackIndex=1,isPaused=true,lastTrackSwitchTime=0,showingSettings=false,guiOpen=true,animating=false,draggingWindow=false,draggingProgress=false,wasPlayingBeforeDrag=false,listPanelOpen=false,queuePanelOpen=false,capturingKeybind=false,isShowingNotification=false,lastDisplayedTime="",draggedButton=nil,isDraggingToQueue=false,draggedTrackIndex=nil,isDraggingToCategory=false,categoryBeingRenamed=nil,expandedCategories={},selectingCategoryForTrack=false,pendingTrackIndexForCategory=nil,hoveredCategoryIndex=nil,shakeIntensity=1,fovIntensity=1,hoveredTrackIndex=nil,hoveredTrackInCategory=false,pendingDeleteTrackIndex=nil,crossfadeTriggered=false,settingsActiveTab="main",searchQuery="",searchActive=false,notifVolume=0.65,muteGameSounds=false,pendingRenameSoundIdIndex=nil,scResults={},scIdx=1,scBusy=false,scGen=0,scArtGen=0,scCid=nil,translateEnabled=false,cinematicMode=false,kbPrev=Enum.KeyCode.F6,kbPlay=Enum.KeyCode.F7,kbNext=Enum.KeyCode.F8,kbRepeat=nil,kbShuffle=nil,kbLyrics=nil,kbTranslate=nil,kbMute=nil,kbCinematic=nil}
local Dat={trackList={},createdSounds={},queueList={},lastMp3Files={},notificationQueue={},categories={},meterBars={},soundEndedConnection=nil,currentTrackAnimationTween=nil,dragStart=nil,startPos=nil,trackOrderList={},listButtonRefs={},suppressAutoNotify={},crossfadingSounds={},activeFadeOutTween=nil,crossfadeCleanupGen=0,currentLyrics={},lyricsFetchGen=0,lastLyricIndex=-1,permanentlyDeleted={},eolFired=false,smoothShakeLoud=0,fovLockedVal=nil,fovBaseline=nil,fovSmooth=0,muteConns={},muteDescConn=nil,toastBarTween=nil,translateCache={},translatePending={},prevTrackIndex=nil}
local UI={}
local shakeVal=Svc.RepS:FindFirstChild("ShakinessEnabled") or Instance.new("BoolValue")
shakeVal.Name="ShakinessEnabled";shakeVal.Value=false;shakeVal.Parent=Svc.RepS;St.screenShakeEnabled=false
local kbVal=Svc.RepS:FindFirstChild("MusicControllerKeybind")
if not kbVal then kbVal=Instance.new("StringValue");kbVal.Name="MusicControllerKeybind";kbVal.Value="N";kbVal.Parent=Svc.RepS end
local function kn2kc(n) for _,k in ipairs(Enum.KeyCode:GetEnumItems()) do if k.Name==n then return k end end end
local curKC=kn2kc(kbVal.Value) or Enum.KeyCode.N
kbVal.Changed:Connect(function(v) local k=kn2kc(v);if k then curKC=k end end)
for _,n in ipairs({"MusicControllerGui","MusicLyricsOverlay","MusicLyricsGui"}) do local x=pGui:FindFirstChild(n);if x then x:Destroy() end end
if _G.__MCMuteCleanup then pcall(_G.__MCMuteCleanup);_G.__MCMuteCleanup=nil end
pcall(function() local f=Svc.SS:FindFirstChild("MusicControllerSounds");if f then for _,s in ipairs(f:GetChildren()) do if s:IsA("Sound") then s:Stop() end end;f:Destroy() end end)
local displayNamesMap=Dat.displayNamesMap or {}
local function loadDisplayNames() if isfile(Cfg.DNPATH) then local ok,r=pcall(function() return Svc.HS:JSONDecode(readfile(Cfg.DNPATH)) end);if ok and r then displayNamesMap=r end end end
local function saveDisplayNames() if not isfolder(Cfg.configsPath) then makefolder(Cfg.configsPath) end;pcall(function() writefile(Cfg.DNPATH,Svc.HS:JSONEncode(displayNamesMap)) end) end
local flaggedInstrumental={};local function loadFlagged() if isfile(Cfg.FLAGGED_PATH) then local ok,r=pcall(function() return Svc.HS:JSONDecode(readfile(Cfg.FLAGGED_PATH)) end);if ok and type(r)=="table" then flaggedInstrumental=r end end end;local function saveFlagged() if not isfolder(Cfg.configsPath) then makefolder(Cfg.configsPath) end;pcall(function() writefile(Cfg.FLAGGED_PATH,Svc.HS:JSONEncode(flaggedInstrumental)) end) end
local function saveSettings()
	if not isfolder(Cfg.configsPath) then makefolder(Cfg.configsPath) end
	local function kbn(k) return St[k] and St[k].Name or nil end
	local d={volume=St.currentVolume,speed=St.currentSpeed,increment=St.currentIncrement,crossfade=St.crossfadeEnabled,repeat_=St.repeatEnabled,shuffle=St.shuffleEnabled,shakeIntensity=St.shakeIntensity,fovIntensity=St.fovIntensity,notifVolume=St.notifVolume,mute=St.muteGameSounds,translate=St.translateEnabled,kbPrev=kbn("kbPrev"),kbPlay=kbn("kbPlay"),kbNext=kbn("kbNext"),kbRepeat=kbn("kbRepeat"),kbShuffle=kbn("kbShuffle"),kbLyrics=kbn("kbLyrics"),kbTranslate=kbn("kbTranslate"),kbMute=kbn("kbMute"),kbCinematic=kbn("kbCinematic")}
	pcall(function() writefile(Cfg.SETTINGS_PATH,Svc.HS:JSONEncode(d)) end)
end
local function loadSettings()
	if not isfile(Cfg.SETTINGS_PATH) then return end
	local ok,d=pcall(function() return Svc.HS:JSONDecode(readfile(Cfg.SETTINGS_PATH)) end)
	if not ok or not d then return end
	if type(d.volume)=="number" then St.currentVolume=d.volume end;if type(d.speed)=="number" then St.currentSpeed=d.speed end
	if type(d.increment)=="number" then St.currentIncrement=d.increment end;if type(d.crossfade)=="boolean" then St.crossfadeEnabled=d.crossfade end
	if type(d.repeat_)=="boolean" then St.repeatEnabled=d.repeat_ end;if type(d.shuffle)=="boolean" then St.shuffleEnabled=d.shuffle end
	if type(d.shakeIntensity)=="number" then St.shakeIntensity=d.shakeIntensity end
	if type(d.fovIntensity)=="number" then St.fovIntensity=d.fovIntensity end
	if type(d.notifVolume)=="number" then St.notifVolume=d.notifVolume end;if type(d.mute)=="boolean" then St.muteGameSounds=d.mute end
	if type(d.translate)=="boolean" then St.translateEnabled=d.translate end
	local function lkb(k,def) if type(d[k])=="string" then local kc=Enum.KeyCode:GetEnumItems();for _,e in ipairs(kc) do if e.Name==d[k] then St[k]=e;return end end end;St[k]=def end


Comments

2
Log in to join the conversation. Login
unusualot's profile picture
unusualot8 months ago

Put an exit button for us mobile players

1
Arspwtor's profile picture
ArspwtorUploader8 months ago

the clanker scriptblox automation got me and dont worry we're back again, there is also a new beginner mp3 file existing onto your music controller if you just got the script. skip to 0:45 for peak

1

More universal scripts

See all