Madara UI
Key Required

Madara UI

Brookhaven 🏡RPstrawfiberstrawfiber 1.4K views 6.6K executesUpdated Aug 31, 2026
Unrated
00
Lua Script•20 lines (795 chars)
-- Placed in ServerScriptService (Server Side)
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local PlaySoundEvent = Instance.new("RemoteEvent")
PlaySoundEvent.Name = "PlaySoundEvent"
PlaySoundEvent.Parent = ReplicatedStorage

PlaySoundEvent.OnServerEvent:Connect(function(player, soundId)
    -- Validation: Ensure the soundId is safe or allowed in your game
    if type(soundId) == "string" and string.match(soundId, "^rbxassetid://%d+$") then
        local sound = Instance.new("Sound")
        sound.SoundId = soundId
        sound.Parent = player.Character or player.CharacterAdded:Wait()
        sound:Play()
        
        -- Clean up the sound object after it finishes playing
        sound.Ended:Connect(function()
            sound:Destroy()
        end)
    end
end)

Features & Information

It can play sound effects fe, and even flashbangs, make sure to give flash warnings

Community Comments (0)

No comments yet for this script.

More Scripts for Brookhaven 🏡RP