Getters
Signals
Call:Connect(callback) on these. They get cleaned up when your script unloads.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Murderers vs Sheriffs Duels api.game: match and team state.
| 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. |
: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. |
api.game.onMatchChanged:Connect(function(matchId)
api.ui.toast(matchId and "Match started" or "Back in lobby")
end)