> ## Documentation Index
> Fetch the complete documentation index at: https://luau.limerence.biz/llms.txt
> Use this file to discover all available pages before exploring further.

# Murderers vs Sheriffs Duels

> Murderers vs Sheriffs Duels api.game: match and team state.

**Murderers vs Sheriffs Duels only.** Match and team state. Every getter returns the current value the moment you call it.

## Getters

| Call            | Returns   | What it tells you                             |
| --------------- | --------- | --------------------------------------------- |
| `isInMatch()`   | `boolean` | Whether you're in a match.                    |
| `getMatchId()`  | `any?`    | The current match id, or `nil` in the lobby.  |
| `getTeam()`     | `string?` | Your side, or `nil` when you have none.       |
| `getGamemode()` | `string?` | The current game mode, or `nil` when unknown. |

## Signals

Call `:Connect(callback)` on these. They get cleaned up when your script unloads.

| Signal           | Your callback receives                     |
| ---------------- | ------------------------------------------ |
| `onMatchChanged` | `(matchId?)`: you entered or left a match. |
| `onTeamChanged`  | `(team?)`: your side changed.              |

## Example

```luau theme={null}
api.game.onMatchChanged:Connect(function(matchId)
    api.ui.toast(matchId and "Match started" or "Back in lobby")
end)
```
