> 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/groups/granting-revoking-a-group.md).

# Granting/Revoking a Group

### Granting

Granting a group to a user is simple: You need to provide the group to grant and the user to grant it to.\
\
Consider these examples:

```genie
set {_lp} to luckperms user from player:
edit user {_lp}:
    grant luckperms group "admin"
send "You are now an admin! With great power comes great responsibility.." to player
```

```genie
set {_lp} to luckperms user from player
edit user {_lp}:
    grant luckperms group "donator" for 30 days
send "You just got donator role for 30 days! Consider donating again to get it for another 30 days!" to player
```

### Revoking

Revoking a group from a user is just like granting: You need to provide the group to revoke and the user to revoke it from.\
\
Consider this example:

```genie
set {_lp} to luckperms user from player
    edit user {_lp}:
        revoke luckperms group "staff"
    send "You just lost your staff role!" to player
```


---

# 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/groups/granting-revoking-a-group.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.
