Skip to content

Instantly share code, notes, and snippets.

@ggtylerr
Last active September 13, 2022 00:52
Show Gist options
  • Save ggtylerr/b0576b4c14e05dd8a2def4dc6059555c to your computer and use it in GitHub Desktop.
Save ggtylerr/b0576b4c14e05dd8a2def4dc6059555c to your computer and use it in GitHub Desktop.
Returns the OOF sound effect in Roblox (and really any sound as the death sfx)

This is a quick batch (and shell) script to add back the original death sound effect to Roblox. It allows you to use any .ogg file you want and automatically replaces the current one in your game.

A few notes:

  • When your game is updated, the sound effect will be replaced and you will need to run this script again.
  • The original sound effect is not included to avoid any copyright issues. You can download the original here.

Mac users

Linux users

Windows

  • Download return-oof.bat (right click 'raw' and save link as...)
  • Get an audio file and convert it to .ogg if it isn't one
  • Rename the audio file to ouch.ogg and place it in the same folder as the .bat script.
  • Run the .bat script. (Double click)
  • Check in game (Mess around with the volume slider or just reset)

If this doesn't work, you likely have Roblox installed in a different location. To fix that...

  • Search up "Roblox" in the start menu, right click it and open folder location
  • Right click the shortcut "Roblox Player" and press open folder
  • Go into content, then sounds
  • Click the address bar (the bar at the top of the files indicating where it is) and copy the location
  • Open up command prompt (search up 'cmd' in the start menu)
  • Type cd (directory), with (directory) being the folder where you placed return-oof.bat
  • Type return-oof.bat (roblox dir), with (roblox dir) being the location you copied earlier

Mac

Unfortunately I don't own a Mac and my VM is too slow to try out Roblox.

You should be able to use the same return-oof.sh script as Linux, but I cannot guarantee it works. You'll have to find and set Roblox's directory manually - you can find the location by going to Applications in Finder, right clicking Roblox, pressing 'Show package contents', and opening contents/sounds.

Linux

You can use return-oof.sh. Due to the wide range of Linux distros and a few ways to get Roblox running on them, you'll have to find and set the directory manually. Once you do so, you can run return-oof.sh <dir>.

Please note that you'll still need to get an audio file, rename it to ouch.ogg, and move it to the same directory as the shell script. If there's enough interest, I'll implement flags so this won't be required.

@echo off
Rem Check if file exists
if not exist ouch.ogg (
echo ouch.ogg does not exist in this directory. && exit /b 1
)
Rem Probably a really bad way to get the current directory but whatever
for /f %%i in ('cd') do set curr=%%i
Rem CD to content folder
if exist %1 (
cd %1
) else (
cd %UserProfile%\AppData\Local\Roblox\Versions
for /d %%a in (*) do cd "%%~a"
cd ./content/sounds
)
Rem Rename old sound effect and copy the new one to here
rename ouch.ogg ouch.old.ogg
cp %curr%/ouch.ogg %cd%/ouch.ogg
Rem CD back to original folder
cd %curr%
echo Your death sound is back. Oof.
# Check if file exists
if ! [ -f "./ouch.ogg" ]; then
echo "ouch.ogg does not exist in this directory." && exit
fi
# Save current dir
curr=$(pwd)
# Check and CD to Roblox dir
if [ -d "$1" ]; then
cd $1
else
echo "Directory does not exist." && exit
fi
# Rename old sound effect and copy the new one to here
mv ./ouch.ogg ./ouch.old.ogg
cp $curr/ouch.ogg ./ouch.ogg
# CD back to original folder
cd $curr
echo "Your death sound is back. Oof."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment