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

# Points & Reputation

> Read and update a user's points balance and read their reputation.

## getUserPoints

Returns a user's current points balance.

```lua theme={null}
local balance = BloxCord:Invoke("getUserPoints", actor, target)
```

### Parameters

<ParamField body="actor" type="Player | table | number" required>
  The entity requesting the balance. See [the actor object](/concepts#the-actor-object).
</ParamField>

<ParamField body="target" type="Player | number | string" required>
  The user whose balance to read. Accepts a `Player` instance or a raw `UserId`.
</ParamField>

### Returns

<ResponseField name="balance" type="number | nil">
  The user's points balance, or `nil` if the request failed or the backend was unreachable.
</ResponseField>

### Example

```lua theme={null}
local BloxCord = game:WaitForChild("BloxCord")

local balance = BloxCord:Invoke("getUserPoints", requester, player)
if balance then
    print(player.Name .. " has " .. balance .. " points")
end
```

***

## updateUserPoints

Adds to (or subtracts from) a user's points balance.

```lua theme={null}
local result = BloxCord:Invoke("updateUserPoints", actor, target, amount, reason, category)
```

### Parameters

<ParamField body="actor" type="Player | table | number" required>
  Who is granting/removing the points. See [the actor object](/gi-concepts#the-actor-object).
</ParamField>

<ParamField body="target" type="Player | number | string" required>
  The user whose balance to change. Accepts a `Player` instance or a raw `UserId`.
</ParamField>

<ParamField body="amount" type="number" required>
  The amount to apply. Use a negative number to deduct points.
</ParamField>

<ParamField body="reason" type="string">
  Optional reason recorded with the transaction.
</ParamField>

<ParamField body="category" type="string">
  Optional category to group the transaction under.
</ParamField>

### Returns

<ResponseField name="result" type="table | nil">
  The transaction result from the dashboard on success, or `nil` on failure.
</ResponseField>

### Example

```lua theme={null}
local BloxCord = game:WaitForChild("BloxCord")

BloxCord:Invoke("updateUserPoints", host, player, 10, "Attended training", "Training")
```

***

## getReputation

Returns a user's reputation record.

```lua theme={null}
local reputation = BloxCord:Invoke("getReputation", actor, target)
```

### Parameters

<ParamField body="actor" type="Player | table | number" required>
  The entity requesting the reputation. See [the actor object](/concepts#the-actor-object).
</ParamField>

<ParamField body="target" type="Player | number | string" required>
  The user whose reputation to read. Accepts a `Player` instance or a raw `UserId`.
</ParamField>

### Returns

<ResponseField name="reputation" type="table | nil">
  The reputation payload from the dashboard on success, or `nil` on failure.
</ResponseField>

### Example

```lua theme={null}
local BloxCord = game:WaitForChild("BloxCord")

local reputation = BloxCord:Invoke("getReputation", requester, player)
if reputation then
    print(player.Name, "reputation:", reputation)
end
```
