> For the complete documentation index, see [llms.txt](https://skript-luckperms.gitbook.io/skript-luckperms/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://skript-luckperms.gitbook.io/skript-luckperms/the-basics.md).

# The Basics

## Getting a LuckPerms User

{% hint style="danger" %}
Before reading these tutorials I strongly suggest you at least know the basics of LuckPerms.\
If not, then please see <https://luckperms.net/wiki/Usage>
{% endhint %}

To access a chunk of stuff in Skript-LuckPerms, you need a LuckPerms user.<br>

To do that, you need to use either the load user effect or the quick user expression.\
\
(What is the difference between the two, you may ask? Quick user is used when the player is online.\
The load user effect is used when the player is offline.)

{% hint style="warning" icon="face-frown-slight" %}
Note that the load user effect will delay the code and make it impossible to use in return functions or anything that returns something. This is not something that is fixable due to Skript needing immediate return values.
{% endhint %}

Example:

```genie
set {_lp} to luckperms user from player
```

or for quick user:<br>

```genie
set {_lp} to quick luckperms user from player
```

## Examples

### Getting The Prefix of a User

```dart
on chat:
    set {_lp} to quick luckperms user from player
    set {_prefix} to prefix of user {_lp}
    set {_message} to unformatted message
    set the chat format to "%{_prefix}% %player's display name%: %{_message}%"
```

This would show the player's prefix the player's displayname and the message they sent like this:<br>

<figure><img src="/files/COLPf65vl8pqfnsnZUVe" alt="" width="563"><figcaption></figcaption></figure>

## Getting a LuckPerms Group

Unlike LuckPerms users, getting a LuckPerms group is quite easy since they are always cached in memory.

As such you can simply just input a string ("mygroup") whenever a group is needed and a converter will handle it for you.\
\
\
Consider this example:<br>

```dart
set {_weight} to weight of "mygroup"
```

### Getting a LuckPerms Track

Just like LuckPerms groups, you can input a string ("mytrack") whenever a track is needed and a converter will handle it for you.\
\
Consider this example:<br>

```dart
set {_list::*} to all of the groups in track "example"
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://skript-luckperms.gitbook.io/skript-luckperms/the-basics.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
