Play a sound on ban.

So I use to use a code awhile back on how to play a sound when a player gets banned. And this is the current code I have down below. The issue with it is that it plays the sound but doesn’t Kick/Ban them from the server. It just plays the sound and it shows they were banned in chat but really never was banned. Any fixes? ( I use ULX/Ulib )

local meta = FindMetaTable( “Player” )
local sound = “siege/jihad.wav”

meta._ban = meta._ban or meta.Ban
meta._kick = meta._kick or meta.Kick

local function playSound( )
BroadcastLua ( “surface.PlaySound ( '” … sound … “’)” )
end

function meta:Ban( minutes, kick )
playSound()
meta._ban( minutes, kick )
end

function meta:Kick( reason )
playSound()
meta._kick( reason )
end

ULX overrides the ban function by itself iirc, so this conflicts with the override.

So how can I have a code that when banned it plays the sound?

Override/Edit the ULX that overrides the ban function.

https://github.com/Nayruden/Ulysses/blob/31f292516f7d6b379cdcaaedc5e6921ff58db306/ulx/lua/ulx/modules/sh/util.lua#L69

I assume I remove that code and insert the code I put above?

No, modify the function linked to play the sound.

Sorry, I don’t have a strong knowledge base on LUA. So i’m unsure how to do so.