command /rebirth:
trigger:
set metadata tag "rebirthGUI" of player to dropper inventory named "Rebirth"
set slot 4 of metadata tag "rebirthGUI" of player to totem of undying named "&eRebirth" with lore "&7&oBurn to rise again.", "", "&7Price: &e$%format(10000000*({rebirth::%player's uuid%} ? 1))%", "&cGrants +1x multiplier."
open metadata tag "rebirthGUI" of player to player
on inventory click:
if event-inventory = metadata tag "rebirthGUI" of player:
cancel event
if index of event-slot = 4:
if player's balance >= 15000000 * ({rebirth::%player's uuid%} ? 1):
remove 15000000 * ({rebirth::%player's uuid%} ? 1) from player's balance
add 1 to {multiplier::%player's uuid%} and {rebirth::%player's uuid%}
play sound "ui.toast.challenge_complete" for player
set {generate::%player's uuid%} to 1
delete {generators::%player's uuid%::*}
set player's balance to 0
clear player's inventory
clear player's enderchest
else:
play sound "entity.villager.no"
for some reason, this script has a cooldown so people cant rebirth. the cooldown is ish 10 min but idk how to fix it