--by pavetr.top/ds RunConsoleCommand("spawnmenu_reload") CreateConVar("footstep_volume", "1.0", {FCVAR_ARCHIVE, FCVAR_REPLICATED}, "Set footstep volume multiplier (0.0 - 2.0)") CreateConVar("footstep_enabled", "1", {FCVAR_ARCHIVE, FCVAR_REPLICATED}, "Enable or disable custom footstep sounds (0 = off, 1 = on)") hook.Add("PlayerFootstep", "CustomFootstepVolume", function(ply, pos, foot, sound, volume) if IsValid(ply) and GetConVar("footstep_enabled"):GetBool() then local volumeMultiplier = GetConVar("footstep_volume"):GetFloat() -- Ensure volume stays within range local adjustedVolume = math.Clamp(volumeMultiplier, 0.1, 2) -- Scale volume properly local soundLevel = math.Clamp(75 + (volumeMultiplier * 15), 75, 160) -- Play the sound with increased sound level and volume ply:EmitSound(sound, soundLevel, 100, math.min(volumeMultiplier, 1)) return true -- Prevent default footstep sound end end) hook.Add("PopulateToolMenu", "FootstepVolumeSettings", function() spawnmenu.AddToolMenuOption("Options", "Player", "FootstepVolume", "Footstep Volume", "", "", function(panel) panel:ClearControls() panel:NumSlider("Footstep Volume", "footstep_volume", 0, 2, 2) panel:CheckBox("Enable Footstep Sounds", "footstep_enabled") end) end) concommand.Add("toggle_footsteps", function(ply) local currentState = GetConVar("footstep_enabled"):GetBool() RunConsoleCommand("footstep_enabled", currentState and "0" or "1") ply:ChatPrint("Footstep sounds " .. (currentState and "disabled" or "enabled")) end)