> ## 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.

# Bloxstrike

> Bloxstrike-only local-player calls: weapon, ammo, money, armor, flash, scope, defuse, hostages, spectators.

**Bloxstrike only.** Guard with `if api.client.x then` before calling on other games.

## Getters

| Call                        | Returns            | What it tells you                                                                                                                                     |
| --------------------------- | ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| `getWeapon()`               | `LoadoutEntry?`    | What you're currently holding. `nil` if empty-handed.                                                                                                 |
| `getWeaponProperties()`     | `any?`             | Detailed weapon stats (damage, fire rate, range, etc.).                                                                                               |
| `getInventory()`            | `{ LoadoutEntry }` | Everything in your inventory.                                                                                                                         |
| `getMoney()`                | `number`           | Your current money. `0` if unknown.                                                                                                                   |
| `getAmmo()`                 | `AmmoState?`       | Ammo for what you're holding: `{ rounds, reserve }`. `nil` when empty-handed or the item has no ammo. See [AmmoState](/reference/types#client-types). |
| `isBlind()` / `isFlashed()` | `boolean`          | `true` while a flashbang is whiting out your screen.                                                                                                  |
| `getFlashVisibility()`      | `number`           | How much you can see while flashed. `0` = fully white, `1` = no flash.                                                                                |
| `isScoped()`                | `boolean`          | `true` while zoomed in with a scoped weapon.                                                                                                          |
| `isDefusing()`              | `boolean`          | `true` while you're actively defusing the bomb.                                                                                                       |
| `isClimbing()`              | `boolean`          | `true` while climbing a ladder.                                                                                                                       |
| `hasC4()`                   | `boolean`          | `true` if you're carrying the bomb.                                                                                                                   |
| `isRescuingHostage()`       | `boolean`          | `true` while channeling a hostage rescue.                                                                                                             |
| `isCarryingHostage()`       | `boolean`          | `true` while carrying a rescued hostage.                                                                                                              |
| `getArmor()`                | `ArmorState`       | Armor type and durability. See [ArmorState](/reference/types#client-types).                                                                           |
| `hasArmor()`                | `boolean`          | `true` if you have kevlar.                                                                                                                            |
| `hasHelmet()`               | `boolean`          | `true` if you have a helmet (implies kevlar).                                                                                                         |
| `getSpectatorCount()`       | `number`           | How many players are spectating you.                                                                                                                  |
| `isBeingSpectated()`        | `boolean`          | `true` if at least one player is spectating you.                                                                                                      |

## Signals

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

| Signal                     | Your callback receives                                        |
| -------------------------- | ------------------------------------------------------------- |
| `onWeaponChanged`          | `(weapon)`: `nil` if you go empty-handed                      |
| `onSpectatingChanged`      | `(spectating)`                                                |
| `onBlindChanged`           | `(blind)`: flashbang start / end                              |
| `onFlashVisibilityChanged` | `(visibility)`: every frame while flashed, as vision recovers |
| `onScopedChanged`          | `(scoped)`                                                    |
| `onDefusingChanged`        | `(defusing)`                                                  |
| `onC4Changed`              | `(hasC4)`                                                     |
| `onRescuingChanged`        | `(rescuing)`: started or stopped rescuing a hostage           |
| `onCarryingChanged`        | `(carrying)`: picked up or dropped a hostage                  |
| `onArmorChanged`           | `(armor)`: bought armor, took damage, or reset                |
| `onSpectatorCountChanged`  | `(count)`                                                     |
| `onMoneyChanged`           | `(money)`                                                     |

## Example

```luau theme={null}
api.client.onWeaponChanged:Connect(function(weapon)
    print("equipped:", weapon and weapon.Name or "nothing")
end)

-- Watch your economy
api.client.onMoneyChanged:Connect(function(money)
    local ammo = api.client.getAmmo()
    print("money:", money, "ammo:", ammo and ammo.rounds or "-")
end)
```
