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

V2 · Batchable

Requires Org Functions

Returns a user's current points balance.

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

### Parameters

**actor** `Player | table | number` *required*

The entity requesting the balance. See [the actor object](https://docs.bloxcord.net/api/concepts.md#the-actor-object).

**target** `Player | number | string` *required*

The user whose balance to read. Accepts a `Player` instance or a raw `UserId`.

### Returns

**balance** `number | nil`

The user's points balance, or `nil` if the request failed or the backend was
unreachable.

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

V2 · Batchable

Requires Org Functions

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

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

### Parameters

**actor** `Player | table | number` *required*

Who is granting/removing the points. See [the actor object](https://docs.bloxcord.net/api/concepts.md#the-actor-object).

**target** `Player | number | string` *required*

The user whose balance to change. Accepts a `Player` instance or a raw `UserId`.

**amount** `number` *required*

A non-zero integer to apply. Positive awards points; negative deducts them.
The magnitude cannot exceed **1,000,000** per call.

**reason** `string`

Optional reason recorded with the transaction (shown in the points history).

**category** `string` (default: manual)

Optional category to group the transaction under. One of `"manual"`,
`"system"`, `"event"`, or `"adjustment"`. Any other value falls back to
`"manual"`.

### Returns

**result** `table | nil`

The transaction result on success, or `nil` if the request was rejected
(e.g. a zero or out-of-range amount) or the backend was unreachable.

**result fields**

**success** `boolean`

`true` when the transaction was applied.

**userId** `string`

The affected user's `UserId`.

**amount** `number`

The signed amount that was applied.

**balance** `number`

The user's new balance after the change.

### Examples

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

local result = BloxCord:Invoke("updateUserPoints", host, player, 10, "Attended training", "event")
if result and result.success then
    print(player.Name .. " now has " .. result.balance .. " points")
end
```

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

-- Negative amount removes points.
BloxCord:Invoke("updateUserPoints", host, player, -5, "No-show penalty", "adjustment")
```

***

## getReputation

V2 · Batchable

Requires Org Functions

Returns a user's reputation record.

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

### Parameters

**actor** `Player | table | number` *required*

The entity requesting the reputation. See [the actor object](https://docs.bloxcord.net/api/concepts.md#the-actor-object).

**target** `Player | number | string` *required*

The user whose reputation to read. Accepts a `Player` instance or a raw `UserId`.

### Returns

**reputation** `table | nil`

The user's reputation summary on success, or `nil` on failure.

**reputation fields**

**userId** `string`

The user's `UserId`.

**reputation** `number`

The user's net reputation total (can be negative).

**count** `number`

How many individual reputation entries the user has received.

### Example

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

local rep = BloxCord:Invoke("getReputation", requester, player)
if rep then
    print(("%s: %d reputation across %d entries"):format(player.Name, rep.reputation, rep.count))
end
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.