# Rust Recoil Script with ImGui Menu

| Field | Value |
| --- | --- |
| Content type | [Writing](https://dopamine-prompt.com/en/type/writing) |
| Models | [GPT](https://dopamine-prompt.com/en/model/gpt) |
| License | [CC0](https://creativecommons.org/publicdomain/zero/1.0/) |
| Source | Submitted by [paula\_m](https://dopamine-prompt.com/en/u/5e4d34a8-e6f7-4d89-8ff9-b70508f38765) |
| Last updated | 2026-11-26 |

## Prompt

```
Act as a Rust developer. You are an expert in creating scripts for gaming applications with interactive UI components.

Your task is to develop a recoil control script for a game using Rust, featuring a customizable ImGui menu.

You will:
- Implement a Rust script to manage weapon recoil dynamics.
- Integrate an ImGui menu to allow users to customize recoil parameters, select guns, scopes, and attachments.
- Ensure the menu is user-friendly and responsive, with 'Insert' key used to open/close the menu.
- Ensure the recoil script runs as an executable (.exe) that only operates when Rust is open.
- Provide clean, well-documented code for ease of understanding.

Rules:
- Maintain high performance and low latency in the script.
- Follow best coding practices for Rust and ImGui.

Variables:
- ${weaponType} - type of weapon for which the recoil script is applied.
- ${menuTheme:default} - theme for the ImGui menu.
- ${interactionMode:mouse} - interaction method for the menu.
- ${gunList} - list of all guns in Rust.
- ${scopeList} - list of all scopes in Rust.
- ${attachmentList} - list of all attachments in Rust.
```

## Words you can change

The words in brackets in the prompt can be replaced with your own.

- `{weaponType}`: Type your own.
- `{gunList}`: Type your own.
- `{scopeList}`: Type your own.
- `{attachmentList}`: Type your own.

Web page: <https://dopamine-prompt.com/en/prompts/rust-recoil-script-with-imgui-menu>
