The Ultimate audio player (Many features) v1.4

Hello developers! I just dropped this audio player which can be used in games to play background music or just play music in general. The user is given the ability to manipulate most audio properties.

NOTE: I do not recommend you to use this audio player. It has many issues and needs to be worked on, it is also worth noting that I made this 2 years ago at a time where my scripting knowledge was pretty basic. I may rework this or fix all the obvious issues and when I do, I will bump this topic.
Edited on: 30/6/2024

This is my second resource!

UPDATE LOGS

1.1 Update!

Changed script to be more efficient
Changed “Effects” to be a bit smaller


1.2 Update!

Added new icon in model thumbnail!
image


Update 1.3

  • The Time Length in the music player was replaced with the name of the audio that is being played:
    image

  • The "Show the ID of the current song is replaced with “Show song info”
    image
    The “Show song info” also contains the length of the current audio in Mins.


Update 1.4

Added Pause time and an option to disable the UI

Added an automatic instance placing script.

Fixed a few bugs
Changed some stuff
Changed some stuff in the instructions script.


The ulimate audio player icon

You don’t have to credit me, but if you do, it would be greatly appreciated! (:

Roblox Model


Preview:

NOTE: This is not an accurate representation of the model. Updates were made, Check the Update logs in this post.




image


image


You can remove the credit if you want



Video preview (“Effects” text is smaller than it is shown on the video)


print("Thank you for using the The Ultimate Audio Player!") -- You can remove this if you want.

-- IF YOU DO NOT CHANGE THE "MUST CHANGE", THE WHOLE SCRIPT WONT WORK.
-- Do not delete this script, the whole model wont work without it.
-- Made by yousefoyoy
-- If you want to change some stuff, only change if it has "(Can be changed)" next to the "--" NOTE: YOU CAN ONLY CHANGE STUFF IF YOU KNOW WHAT YOU'RE DOING.
-- You can change the icons if you want

-- -------------> "(Must change)" means that you have to change it based on the instructions givin. <---------------

local music = game.Workspace.Music_Player -- Make sure that the audio is in workspace
local muteANDunmute = script.Parent.MuteAndUnmute
local info = script.Parent.Info
local OpenSettings = script.Parent.Settings
local settings_tab = script.Parent.Parent.Setting_Menu
local song_id = script.Parent.Parent.Song_ID
local setting_options = {settings_tab.Loop,settings_tab.Song_ID,settings_tab.Effects,settings_tab.Play_Your_own_song} -- This contains all of the settings in the "setting tab"
local effect_tab = script.Parent.Parent.Effects_Tab
local your_music = script.Parent.Parent.Your_music
local service = game:GetService("MarketplaceService")
local pause_between_audios = script.Parent.Pause_between_audio

local remove_audio_ui = false -- (NOT LOCAL) If you want the audio player UI to be removed then make this true.

local pause_time = 1 -- (Can be changed)


local sounds = {???,???,???} -- -----> (Must change) <----- Place the songs/sounds you want to use here. (make sure you separate each id with a comma. Like this: 1234567,7654321 )


pause_between_audios.Value = pause_time
music.SoundId = 'rbxassetid://'..sounds[math.random(1,#sounds)]
music.Playing = true

local Start_Song_ID_Name = music.SoundId:match("%d+") -- Getting the name of the song
info.Text = service:GetProductInfo(Start_Song_ID_Name,Enum.InfoType.Asset).Name 

if remove_audio_ui == true then
	
	game.ReplicatedStorage.Audio_player_remoteEvent:FireServer()
	
end

----------------------------------------------------------------------------------------------------------------------

muteANDunmute.MouseButton1Click:Connect(function() -- Mute and unmute
	
	if music.Volume == 0 then
		
		music.Volume = 1
		
		muteANDunmute.Image = 'rbxassetid://7072724897'-- (Can be changed) Changes Audio Icon
		
	else

		music.Volume = 0
		
		muteANDunmute.Image = 'rbxassetid://7072724946'-- (Can be changed)  Changes Audio Icon
		
	end
end)


music:GetPropertyChangedSignal("TimeLength"):Connect(function() -- Getting the name of the song when song is changed
	
	local Song_ID_Name = music.SoundId:match("%d+")
	info.Text = service:GetProductInfo(Song_ID_Name,Enum.InfoType.Asset).Name 
	
end)


music.Ended:Connect(function()
	
	task.wait(pause_between_audios.Value)
	
	music.SoundId = 'rbxassetid://'..sounds[math.random(1,#sounds)]
	music.Playing = true
	
end)

------------------------------------ Settings tab ------------------------------------ 

OpenSettings.MouseButton1Click:Connect(function() -- Setting tab: Open and close
	
	settings_tab.Visible = not settings_tab.Visible
	
end)


setting_options[1].ImageButton.MouseButton1Click:Connect(function() -- Loop setting
	
	if setting_options[1].ImageButton.Image == 'rbxassetid://7072722963' then
		
		setting_options[1].ImageButton.Image = 'rbxassetid://7072706576'
		
		music.Looped = true
		
	else
		
		setting_options[1].ImageButton.Image = 'rbxassetid://7072722963'
		
		music.Looped = false
		
		
	end
	
end)

setting_options[2].ImageButton.MouseButton1Click:Connect(function() -- Show ID setting
	
	if setting_options[2].ImageButton.Image == 'rbxassetid://7072722963' then

		setting_options[2].ImageButton.Image = 'rbxassetid://7072706576'
		
		song_id.Visible = true

	else

		setting_options[2].ImageButton.Image = 'rbxassetid://7072722963'
		
		song_id.Visible = false



	end
	
end)

setting_options[3].ImageButton.MouseButton1Click:Connect(function()
	
	if setting_options[3].ImageButton.Image == 'rbxassetid://7072722963' then

		setting_options[3].ImageButton.Image = 'rbxassetid://7072706576'

		effect_tab.Visible = true

	else

		setting_options[3].ImageButton.Image = 'rbxassetid://7072722963'

		effect_tab.Visible = false
		
	end
end)

setting_options[4].ImageButton.MouseButton1Click:Connect(function()

	if setting_options[4].ImageButton.Image == 'rbxassetid://7072722963' then

		setting_options[4].ImageButton.Image = 'rbxassetid://7072706576'

		your_music.Visible = true

	else

		setting_options[4].ImageButton.Image = 'rbxassetid://7072722963'

		your_music.Visible = false

	end
end)

The main script (Contains instructions)


Would you use it?
  • Yes
  • No
  • I don’t need an audio player

0 voters

Rate this audio player
  • 1
  • 2
  • 3
  • 4
  • 5

0 voters

If you have any suggestions, bug reports or you just want to give your opinion, feel free to post it in the comments below! (:

10 Likes

Heyy well done with the audio player,
Can you fit the text in the UI tho?
image

Otherwise this is awesome, great work.

1 Like

I don’t understand, are you telling me to scale the text?

Yeah, as you can see Effects text size is greater than others.

Looks cool, but here is a few suggestions I have.

Code stuff

change this to
sounds[math.random(1, #sounds)]
so you don’t have to change that part.
this is at the top of the script and in the music.Ended function.

change this to

OpenSettings.MouseButton1Click:Connect(function()

    settings_tab.Visible = not settings_tab.Visible

end)

and for your UI, make all the text the same size. It just doesn’t look right, specifically the “Effects” checkbox has the biggest problem. Other than that, looks cool though I am not likely to use it as I like to make my own assets, and I don’t really need something like this and probably won’t for the foreseeable future. I do think this will help people though.

1 Like

Thanks, I will implement these (:

1 Like

1.1 Update!

Changed script to be more efficient
Changed “Effects” to be a bit smaller

1 Like

1.2 Update!

Added new icon in model thumbnail!
image

1 Like

but


The only feedback i have is add detail to UI, otherwise great job

I understand that the audio update might have a very small impact on this, but this is meant for ingame music, implemented by the dev. This is not a radio played by anyone. I made this system to make it easier for developers to play the music they choose in their games.

And about that “Play your own song” thing, it just lets you to play your own uploaded music and official roblox music if the player wants. (I haven’t tested it yet, but I’m sure it works)

I will try to improve the UI

1 Like

Update 1.3


  • The Time Length in the music player was replaced with the name of the audio that is being played:
    image

  • The "Show the ID of the current song is replaced with “Show song info”
    image
    The “Show song info” also contains the length of the current audio in Mins.


Rate this Update
  • 1
  • 2
  • 3
  • 4
  • 5

0 voters

1 Like

Update 1.4


Added Pause time and an option to disable the UI


Added an automatic instance placing script.


Fixed a few bugs
Changed some stuff
Changed some stuff in the instructions script.