Custom OBS Script to Hide your map in the game Rust to stop from getting stream sniped
A Lua script for OBS Studio that instantly hides your map in Rust when pressing designated hotkeys. This script provides better response time than standard OBS hotkeys, ensuring your map is hidden immediately when needed.
- Instantly shows/hides a cover image when holding G or Shift+G
- FIXED: Includes a slight delay on release to prevent the map from flashing.
- Persists hotkey settings between OBS sessions
- Simple setup process
- OBS Studio version 27.0.0 or newer is required for the timer functionality.
- A cover image source set up in OBS
- Download the
rust-obs-map-hide.luascript. - In OBS Studio, go to Tools -> Scripts.
- Click the
+button and select the downloaded script. - Configure the script settings (see Setup below).
-
In OBS, create an image source that will cover your map:
- Click the
+under Sources. - Select "Image".
- Name it "Map Hidden" (or your preferred name).
- Choose any image (a solid color is recommended).
- Position it to cover your map area.
- Make sure it's hidden by default.
- Click the
-
In the Scripts window:
- Enter the exact name of your image source.
- Make sure the source name matches exactly (it's case-sensitive).
-
Configure hotkeys:
- Go to Settings -> Hotkeys.
- Find "Show Map Cover (Hold G)" and set it to
G. - Find "Show Map Cover (Hold Shift+G)" and set it to
Shift+G. - Click Apply.
- Hold
GorShift+Gto show the cover image. - Release the key to hide it.
- The cover will appear instantly and disappear after a brief delay to prevent flickering.
If the script isn't working:
- Make sure the image source name in the script settings perfectly matches the source name in your OBS scene.
- Verify the hotkeys are properly set in OBS Settings -> Hotkeys.
- Check the Scripts log window for any error messages (
Tools -> Scripts -> Log). - Ensure you are running OBS Studio version 27.0.0 or newer.
MIT License - Feel free to use and modify as needed.
Feel free to open issues or submit pull requests if you have suggestions for improvements.