$toggleRoles

To remove roles from a user if he/she already haves them, or add these roles if he/she does not

Usage:

$toggleRoles[userID;roleID 1;roleID 2;roleID 3;...]


Member07/28/2026
!!exec $toggleRoles[$authorID;$roleID[Member +]]

Used Functions

$roleID, to get the ID of a role by name

Related Functions

$giveRoles, to give roles to a user

$takeRoles, to take roles from a user

$setRoles, to take all roles from a user & give the specified roles back

Function difficulty: Medium
Tags: Toggle roles Give Roles Take Roles Member role

⏱️ Function Cooldown

This function has a built-in cooldown to help prevent excessive usage.

PropertyValue
⏱️ Duration6 seconds
🆔 Tracked ByUser ID
🌐 ScopeUserupdate

Functions with the same Scope share cooldowns based on the same Tracked By value.

💎 Tier 3+ servers bypass this cooldown. See Premium Perksopen in new window.