Universal Script πŸ“Œ
13.6k Views
2.4k Executions

nomusic

Universal Script πŸ“Œ
vincent009
vincent00910 followers
1 year 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

This Roblox Lua script automatically detects and mutes background music in a game by scanning for sounds that match common music-related patterns. It helps players who prefer to listen to their own music or play in silence by suppressing in-game background tracks while keeping other sound effects (like jumping or gunshots) inactive. Good for: Playing your downloaded music you like (e.g., phonk, freestyle music, etc.) while still hearing npc screaming nearby. Probably recommended to auto execute. Key Features: 1. Automatic Music Detection - Uses keywords (e.g., "music," "bgm," "loop") to identify potential background tracks. - Detects looped sounds and long-duration audio (over 30 seconds). - Checks if sounds are under SoundService (a common location for game music). 2. Persistent Muting - Saves original volume before muting (allows for potential restoration). - Locks volume at 0 (prevents games from re-enabling music). - Stops playback of detected music immediately. 3. Comprehensive Scanning - Scans SoundService, Workspace, Lighting, and PlayerGui for existing sounds. - Continuously monitors for new sounds using `DescendantAdded` events. - Recursively checks character models (in case of dynamic sound attachments). 4. Performance Optimized - Uses event-based detection (efficiently hooks into sound additions). - Includes optional periodic scans (every 2 seconds) for missed sounds. - Limits recursion depth to prevent lag. Use Cases: - Players who disable in-game music for a better experience. - Streamers/content creators who want clean audio without background tracks. - Games with obnoxious or repetitive music that can't be muted via settings. Limitations: - probably not good for hangout games Output: - Prints a confirmation when activated. - Warns about potential edge cases. This script is revised for reliability and covers most common cases where games place background music. Adjustments may be needed for specific games with unusual audio setups. Enjoy the script!

Updates

  1. Script edited: Fixed some errors :D

View Raw
--add us on roblox vincentplayz9356
if not game:IsLoaded() then
    game.Loaded:Wait()
end

local Players = game:GetService("Players")
local SoundService = game:GetService("SoundService")
local Workspace = game:GetService("Workspace")
local Lighting = game:GetService("Lighting")

local player = Players.LocalPlayer
if not player then
    Players.PlayerAdded:Wait()
    player = Players.LocalPlayer
end

local playerGui = player:WaitForChild("PlayerGui")

local musicKeywords = {
    "music", "bgm", "soundtrack", "theme", "background", "ambient",
    "song", "melody", "score", "ost", "main theme", "loop", "atmosphere"
}

local processedSounds = {}
local musicDetected = false

local function processSound(sound)
    if not sound:IsA("Sound") then return false end
    if processedSounds[sound] then return false end

    local name = sound.Name:lower()
    local parentName = (sound.Parent and sound.Parent.Name or ""):lower()
    local isMusic = false

    for _, keyword in ipairs(musicKeywords) do
        if name:find(keyword) or parentName:find(keyword) then
            isMusic = true
            break
        end
    end


Comments

1
Log in to join the conversation. Login
rizkigaming586's profile picture
rizkigaming5861 year ago

can this turn off music for everyone in the game?

1

Tags

More universal scripts

See all
Universal Script πŸ“Œ
4.6k
3.0k
Bumped 51 minutes ago
Script hub
9.7k
70.7k
Bumped 2 hours ago
Key System
Script hub
187.0k
1.9M
Bumped 4 hours ago
Key System

Script hub

#13 this week

Verified script badgeAirflow HUB

Script hub
602.2k
52.8k
Bumped 4 hours ago
Script hub
45.6k
11.1k
Bumped 5 hours ago
Key System
Paid

Script hub

#25 this month

Verified script badgeZekeHub - 58 Games, 1,300+ Features