Checking a Player's Current Rank Before Promoting
Hyper Perms Plugin connects HyperScript directly to LuckPerms, allowing server commands to inspect ranks and save promotions in one central place. Before moving a player up a tier, check what rank they currently hold using group of player (or groups of player when someone holds several groups at once), and pull chat styling with prefix of player and suffix of player.
1. Create a player-only command header with command /rankup: and players only: true so the console cannot trigger it by mistake.
2. Under trigger:, verify both rank and currency together: if group of player is "member" and {%player%.coins} >= 1000:
3. Deduct the cost first using subtract 1000 from {%player%.coins} so players cannot claim a free promotion if anything interrupts the command.
4. Promote the player with set group of player to "veteran" and celebrate in chat with broadcast "&6%player.name% &eranked up to Veteran!"
Avoiding Common Rank-Up Script Mistakes
Because every change is saved by LuckPerms, your promoted players keep their new "veteran" rank across restarts with no separate storage file to manage. Two beginner mistakes break rank-up scripts most often: spelling a group name differently from how it exists in LuckPerms (for example, capitalizing "Member" when LuckPerms stores "member"), or forgetting to check group of player so higher ranks accidentally pay 1000 coins to get reset back down to "veteran". Testing /rankup on a non-operator test account ensures the group switch and broadcast work cleanly. Using prefix of player or suffix of player inside confirmation messages also makes rank displays match chat immediately.