dominikssss

Based on the code provided, I want you to create a system where based on the players race type (humans: always get 1 Skill Point, Demi-Humans: can choose between +1 racial class or +2 Skill Points, Heteromorphs: can choose between +1 racial class or +3 Skill Points) a message pops up for the player after they lvl up and via a /levelup command they could then choose in a INVENTORY GUI whether they want the racial lvl up or skill points, try to optimize it as much as possible and try to change as little of the already existing skript as possible

๐Ÿ“Ž 1 file 35,455 chars
๐Ÿ“„
pasted-code-1772877507151.txt
txt 939 lines
โ–ถ
# ============================================================================
# ON JOIN FUNCTIONS
# ============================================================================
on join:
	if {RaceType::%player's uuid%} is not set:
		RaceTypeSelect(player)
	if {PlayerLevel::%player's uuid%} is not set:
		set {PlayerLevel::%player's uuid%} to 0
	if {PlayerLevelEXP::%player's uuid%} is not set:
		set {PlayerLevelEXP::%player's uuid%} to 0
	if {JobLevel::%player's uuid%} is not set:
		set {JobLevel::%player's uuid%} to 0
	if {ClassLevel::%player's uuid%} is not set:
		set {ClassLevel::%player's uuid%} to 0
	if {Mana::%player's uuid%::current} is not set:
		InitializePlayerMana(player)

# ============================================================================
# SKIN RESTORER FUNCTIONS
# ============================================================================

import:
    com.destroystokyo.paper.profile.PlayerProfile

function getPlayerModel(p: player) :: string:
    set {_profile} to {_p}.getPlayerProfile()
    set {_textures} to {_profile}.getTextures()
    set {_model} to "%{_textures}.getSkinModel()%"
    
    if {_model} is "SLIM":
        return "SLIM"
    else:
        return "CLASSIC"


# ============================================================================
# MANA SYSTEM - CONFIGURATION & INITIALIZATION
# ============================================================================

# Base mana values - Modify these to change default stats
# These can be overridden by armor, items, skills via the GetMaxMana() function
on script load:
	# Base mana configuration - Easy to modify
	set {ManaConfig::baseMax} to 100
	set {ManaConfig::baseRegen} to 5

function InitializePlayerMana(player: player):
	set {Mana::%{_player}'s uuid%::current} to GetMaxMana({_player})
	set {Mana::%{_player}'s uuid%::bossbarVisible} to false

# ============================================================================
# MANA SYSTEM - DYNAMIC MAX MANA CALCULATION
# ============================================================================

# This function calculates max mana - MODIFY THIS to add armor/item/skill bonuses
function GetMaxMana(player: player) :: number:
	set {_base} to {ManaConfig::baseMax}
	
	# Add bonuses from various sources (examples - uncomment/modify as needed):
	
	# Armor set bonuses
	# if {ArmorSet::%{_player}'s uuid%} is "mage":
	# 	add 50 to {_base}
	
	# Skill bonuses
	# if {Skill::ManaMastery::%{_player}'s uuid%} is set:
	# 	add ({Skill::ManaMastery::%{_player}'s uuid%} * 10) to {_base}
	
	# Item bonuses (held item)
	# if {_player}'s tool is diamond sword:
	# 	add 25 to {_base}
	
	# Level-based bonus
	# set {_level} to {Level::%{_player}'s uuid%}
	# if {_level} > 1:
	# 	add ({_level} * 2) to {_base}
	
	return {_base}

# ============================================================================
# MANA SYSTEM - DYNAMIC REGEN RATE CALCULATION
# ============================================================================

# This function calculates mana regeneration rate - MODIFY THIS for bonuses
function GetManaRegen(player: player) :: number:
	set {_base} to {ManaConfig::baseRegen}
	
	# Add regen bonuses from various sources (examples):
	
	# Armor bonuses
	# if {ArmorSet::%{_player}'s uuid%} is "meditation":
	# 	add 3 to {_base}
	
	# Skill bonuses
	# if {Skill::Meditation::%{_player}'s uuid%} is set:
	# 	add ({Skill::Meditation::%{_player}'s uuid%} * 0.5) to {_base}
	
	# Buff/debuff effects
	# if {Buff::ManaRegen::%{_player}'s uuid%} is set:
	# 	add {Buff::ManaRegen::%{_player}'s uuid%} to {_base}
	
	return {_base}

# ============================================================================
# MANA SYSTEM - REGENERATION LOOP (OPTIMIZED)
# ============================================================================

every 5 seconds:
	loop all players:
		set {_uuid} to uuid of loop-player
		set {_current} to {Mana::%{_uuid}%::current}
		set {_max} to GetMaxMana(loop-player)
		
		# Only process if mana is not full
		if {_current} < {_max}:
			set {_regen} to GetManaRegen(loop-player)
			
			# Add regen and cap at max
			set {_newMana} to {_current} + {_regen}
			if {_newMana} > {_max}:
				set {_newMana} to {_max}
			
			set {Mana::%{_uuid}%::current} to {_newMana}
			
			# Update or show boss bar
			UpdateManaBossBar(loop-player, {_newMana}, {_max})
		
		# If mana is now full, hide the boss bar
		else if {Mana::%{_uuid}%::bossbarVisible} is true:
			HideManaBossBar(loop-player)

# ============================================================================
# MANA SYSTEM - BOSS BAR FUNCTIONS
# ============================================================================

function UpdateManaBossBar(player: player, current: number, max: number):
	set {_uuid} to uuid of {_player}
	set {_progress} to ({_current} / {_max}) * 100
	
	# Boss bar ID unique to each player
	set {_barId} to "mana_%uuid of {_player}%"
	
	# Delete old boss bar if it exists (to ensure clean update)
	delete boss bar with id {_barId}
	
	# Create fresh boss bar with updated values
	set {_barTitle} to "&b&lMana &3%{_current}%&7/&3%{_max}%"
	set {_bar} to boss bar with id {_barId} with title {_barTitle} with color blue with progress {_progress}
	
	add {_player} to {_bar}
	set {Mana::%{_uuid}%::bossbarVisible} to true

function HideManaBossBar(player: player):
	set {_barId} to "mana_%uuid of {_player}%"
	delete boss bar with id {_barId}
	set {Mana::%uuid of {_player}%::bossbarVisible} to false

# ============================================================================
# MANA SYSTEM - UTILITY FUNCTIONS
# ============================================================================

# Check if player has enough mana
function HasMana(player: player, amount: number) :: boolean:
	return {Mana::%uuid of {_player}%::current} >= {_amount}

# Consume mana (returns true if successful, false if not enough)
function ConsumeMana(player: player, amount: number) :: boolean:
	set {_uuid} to uuid of {_player}
	set {_current} to {Mana::%{_uuid}%::current}
	
	if {_current} >= {_amount}:
		set {_newMana} to {_current} - {_amount}
		set {Mana::%{_uuid}%::current} to {_newMana}
		
		# Show updated boss bar if mana is now not full
		if {_newMana} < GetMaxMana({_player}):
			UpdateManaBossBar({_player}, {_newMana}, GetMaxMana({_player}))
		
		return true
	else:
		return false

# Restore mana (for potions, abilities, etc.)
function RestoreMana(player: player, amount: number):
	set {_uuid} to uuid of {_player}
	set {_current} to {Mana::%{_uuid}%::current}
	set {_max} to GetMaxMana({_player})
	
	set {_newMana} to {_current} + {_amount}
	if {_newMana} > {_max}:
		set {_newMana} to {_max}
	
	set {Mana::%{_uuid}%::current} to {_newMana}
	
	# Show boss bar if mana was restored but not full
	if {_newMana} < {_max}:
		UpdateManaBossBar({_player}, {_newMana}, {_max})

# Get current mana percentage (useful for UI, abilities, etc.)
function GetManaPercent(player: player) :: number:
	set {_current} to {Mana::%uuid of {_player}%::current}
	set {_max} to GetMaxMana({_player})
	return ({_current} / {_max}) * 100

# ============================================================================
# ANTI-EXPLOIT: TRACK PLACED BLOCKS
# ============================================================================

on place:
	# Mark blocks placed by players to prevent EXP farming
	set metadata value "placedByPlayer" of event-block to true

# ============================================================================
# PLAYER INITIALIZATION
# ============================================================================

on first join:
	InitializePlayerLeveling(player)

on join:
	# Ensure returning players have all variables set
	if {Level::%player's uuid%} is not set:
		InitializePlayerLeveling(player)

function InitializePlayerLeveling(player: player):
	# Core leveling stats
	set {Level::%{_player}'s uuid%} to 1
	set {EXP::%{_player}'s uuid%} to 0
	set {EXPN::%{_player}'s uuid%} to 1000
	
	# Stat points for character progression
	set {Statpoints::%{_player}'s uuid%} to 0
	
	# Statistics tracking
	set {Stats::%{_player}'s uuid%::oresMined} to 0
	set {Stats::%{_player}'s uuid%::mobsKilled} to 0
	set {Stats::%{_player}'s uuid%::totalExpGained} to 0
	set {Stats::%{_player}'s uuid%::levelsGained} to 0

# ============================================================================
# CONFIGURATION - MOB GROUPS AND EXP VALUES
# ============================================================================

on script load:
	# Passive Mobs (Tier 1)
	set {MobGroups::passive::*} to "pig", "cow", "sheep", "chicken", "rabbit", "salmon", "cod", "squid", "glow squid"
	set {MobGroups::passive::exp} to 5
	
	# Neutral Mobs (Tier 2)
	set {MobGroups::neutral::*} to "spider", "enderman", "zombified piglin", "wolf", "bee", "dolphin", "panda", "polar bear"
	set {MobGroups::neutral::exp} to 15
	
	# Hostile Mobs (Tier 3)
	set {MobGroups::hostile::*} to "zombie", "skeleton", "creeper", "drowned", "husk", "stray", "phantom", "silverfish", "slime", "magma cube"
	set {MobGroups::hostile::exp} to 25
	
	# Dangerous Mobs (Tier 4)
	set {MobGroups::dangerous::*} to "witch", "vindicator", "pillager", "evoker", "vex", "guardian", "hoglin", "zoglin", "blaze"
	set {MobGroups::dangerous::exp} to 75
	
	# Boss Mobs (Tier 5)
	set {MobGroups::boss::*} to "ender dragon", "wither", "warden", "elder guardian", "ravager"
	set {MobGroups::boss::exp} to 1000

# ============================================================================
# CONFIGURATION - ORE GROUPS AND EXP VALUES
# ============================================================================

on script load:
	# Common Ores (Tier 1)
	set {OreGroups::common::*} to "coal ore", "deepslate coal ore", "copper ore", "deepslate copper ore"
	set {OreGroups::common::exp} to 15
	
	# Uncommon Ores (Tier 2)
	set {OreGroups::uncommon::*} to "iron ore", "deepslate iron ore", "redstone ore", "deepslate redstone ore", "nether gold ore", "nether quartz ore"
	set {OreGroups::uncommon::exp} to 25
	
	# Rare Ores (Tier 3)
	set {OreGroups::rare::*} to "gold ore", "deepslate gold ore", "lapis lazuli ore", "deepslate lapis lazuli ore"
	set {OreGroups::rare::exp} to 50
	
	# Epic Ores (Tier 4)
	set {OreGroups::epic::*} to "emerald ore", "deepslate emerald ore", "diamond ore", "deepslate diamond ore"
	set {OreGroups::epic::exp} to 150
	
	# Legendary Ores (Tier 5)
	set {OreGroups::legendary::*} to "ancient debris"
	set {OreGroups::legendary::exp} to 500

# ============================================================================
# MINING EXP SYSTEM
# ============================================================================

on break:
	# Check if block was placed by a player (anti-exploit)
	if metadata value "placedByPlayer" of event-block is true:
		stop
	
	# Get the block type
	set {_blockType} to "%type of event-block%"
	
	# Check which ore group this block belongs to
	set {_exp} to GetOreExp({_blockType})
	
	# If EXP was found, award it
	if {_exp} > 0:
		AwardExp(player, {_exp}, "&7+&a&l%{_exp}% &r&7Mining EXP")
		add 1 to {Stats::%player's uuid%::oresMined}

function GetOreExp(blockType: text) :: number:
	# Check each ore group for the block type
	if {OreGroups::common::*} contains {_blockType}:
		return {OreGroups::common::exp}
	
	if {OreGroups::uncommon::*} contains {_blockType}:
		return {OreGroups::uncommon::exp}
	
	if {OreGroups::rare::*} contains {_blockType}:
		return {OreGroups::rare::exp}
	
	if {OreGroups::epic::*} contains {_blockType}:
		return {OreGroups::epic::exp}
	
	if {OreGroups::legendary::*} contains {_blockType}:
		return {OreGroups::legendary::exp}
	
	return 0

# ============================================================================
# MOB KILL EXP SYSTEM
# ============================================================================

on death:
	if attacker is a player:
		if victim is not a player:
			# Get the victim's entity type
			set {_mobType} to "%type of victim%"
			
			# Get EXP for this mob type
			set {_exp} to GetMobExp({_mobType})
			
			# Award EXP if valid
			if {_exp} > 0:
				AwardExp(attacker, {_exp}, "&7+&c&l%{_exp}% &r&7Combat EXP")
				add 1 to {Stats::%attacker's uuid%::mobsKilled}

function GetMobExp(mobType: text) :: number:
	# Check each mob group for the entity type
	if {MobGroups::passive::*} contains {_mobType}:
		return {MobGroups::passive::exp}
	
	if {MobGroups::neutral::*} contains {_mobType}:
		return {MobGroups::neutral::exp}
	
	if {MobGroups::hostile::*} contains {_mobType}:
		return {MobGroups::hostile::exp}
	
	if {MobGroups::dangerous::*} contains {_mobType}:
		return {MobGroups::dangerous::exp}
	
	if {MobGroups::boss::*} contains {_mobType}:
		return {MobGroups::boss::exp}
	
	return 0
	
# ============================================================================
# CORE EXP AWARD FUNCTION
# ============================================================================

function AwardExp(player: player, amount: number, message: text):
	# Add EXP to player
	add {_amount} to {EXP::%{_player}'s uuid%}
	add {_amount} to {Stats::%{_player}'s uuid%::totalExpGained}
	
	# Show EXP gain message
	if {ExpNotification::%{_player}'s uuid%} = true:
		send "%{_message}%" to {_player}
	
	# Show boss bar progress
	ShowExpBar({_player})
	
	# Check for level up
	CheckLevelUp({_player})

function ShowExpBar(player: player):
	# Calculate progress percentage
	set {_currentExp} to {EXP::%{_player}'s uuid%}
	set {_neededExp} to {EXPN::%{_player}'s uuid%}
	set {_progress} to ({_currentExp} / {_neededExp}) * 100
	
	# Ensure progress doesn't exceed 100
	if {_progress} > 100:
		set {_progress} to 100
	
	# Create/update boss bar
	set {_level} to {Level::%{_player}'s uuid%}
	set {_barTitle} to "&6&lLevel %{_level}% &7| &a%{_currentExp}%&7/&a%{_neededExp}% EXP"
	set {_xpbar} to boss bar with id "xpbar_%uuid of {_player}%" with title {_barTitle} with color green with progress {_progress}
	
	# Add player to bar and schedule removal
	add {_player} to {_xpbar}
	
	# Remove bar after 3 seconds
	wait 3 seconds
	delete boss bar with id "xpbar_%uuid of {_player}%"

# ============================================================================
# LEVEL UP SYSTEM
# ============================================================================

function CheckLevelUp(player: player):
	set {_currentExp} to {EXP::%{_player}'s uuid%}
	set {_neededExp} to {EXPN::%{_player}'s uuid%}
	
	# Check if player has enough EXP to level up
	while {_currentExp} >= {_neededExp}:
		# Perform level up
		PerformLevelUp({_player})
		
		# Update values for next iteration (handles multiple level ups)
		set {_currentExp} to {EXP::%{_player}'s uuid%}
		set {_neededExp} to {EXPN::%{_player}'s uuid%}

function PerformLevelUp(player: player):
	# Deduct EXP cost
	remove {EXPN::%{_player}'s uuid%} from {EXP::%{_player}'s uuid%}
	
	# Increase level
	add 1 to {Level::%{_player}'s uuid%}
	add 1 to {Stats::%{_player}'s uuid%::levelsGained}
	
	
	# Award stat points
	add 3 to {Statpoints::%{_player}'s uuid%}
	
	# Calculate new EXP requirement (scales with level)
	set {_newLevel} to {Level::%{_player}'s uuid%}
	set {EXPN::%{_player}'s uuid%} to round(1000 * (1.15 ^ {_newLevel}))
	
	# Level up effects
	PlayLevelUpEffects({_player}, {_newLevel})

function PlayLevelUpEffects(player: player, newLevel: number):
	# Title display
	send title "&6&lLEVEL UP!" to {_player} for 3 seconds
	send subtitle "&7You are now level &e&l%{_newLevel}%" to {_player} for 3 seconds
	
	# Sound effects
	play sound "entity.player.levelup" to {_player}
	
	# Chat message
	send "" to {_player}
	send "&6&mโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”" to {_player}
	send "&6&lLEVEL UP!" to {_player}
	send "" to {_player}
	send "&7You have reached level &e&l%{_newLevel}%" to {_player}
	send "&7You gained &a&l3 Stat Points" to {_player}
	send "&7Next level requires: &9&l%{EXPN::%{_player}'s uuid%}% EXP" to {_player}
	send "&6&mโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”" to {_player}
	send "" to {_player}
	
	# Particle effects around player
	set {_location} to {_player}'s location
	loop 20 times:
		set {_offsetX} to (random number between -1 and 1)
		set {_offsetZ} to (random number between -1 and 1)
		set {_particleLoc} to {_location} offset by vector({_offsetX}, 0, {_offsetZ})
		create a custom white dust particle with:
			count: 0
			velocity: inwards
			extra: 0.2
			force: true
		set {_c} to last created particle
		draw 5 of {_c} at {_particleLoc}
		wait 1 tick


# ============================================================================
# PLAYER COMMANDS
# ============================================================================

command /Expnotification []:
	trigger:
		if arg-1 = "on":
			set {ExpNotification::%player's uuid%} to true
			send "&6Exo Notifications are now &aOn!"
		else if arg-1 = "off":
			set {ExpNotification::%player's uuid%} to false
			send "&6Exp Notifications are now &4Off!"

command /level:
	trigger:
		set {_level} to {Level::%player's uuid%}
		set {_exp} to {EXP::%player's uuid%}
		set {_expn} to {EXPN::%player's uuid%}
		set {_progress} to ({_exp} / {_expn}) * 100
		
		send "&6&lโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”" to player
		send "&6&lYOUR LEVEL STATS" to player
		send "" to player
		send "&7Level: &e&l%{_level}%" to player
		send "&7EXP: &a%{_exp}%&7/&a%{_expn}% &7(&2%{_progress}%&7)" to player
		send "&7Stat Points: &5%{Statpoints::%player's uuid%}%" to player
		send "" to player
		send "&6&lโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”" to player

command /levelstats:
	trigger:
		set {_ores} to {Stats::%player's uuid%::oresMined}
		set {_mobs} to {Stats::%player's uuid%::mobsKilled}
		set {_totalExp} to {Stats::%player's uuid%::totalExpGained}
		set {_levels} to {Stats::%player's uuid%::levelsGained}
		
		send "&6&lโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”" to player
		send "&6&lLEVELING STATISTICS" to player
		send "" to player
		send "&7Ores Mined: &b%{_ores}%" to player
		send "&7Mobs Killed: &c%{_mobs}%" to player
		send "&7Total EXP Gained: &a%{_totalExp}%" to player
		send "&7Levels Gained: &e%{_levels}%" to player
		send "" to player
		send "&6&lโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”" to player

# ============================================================================
# MANA COMMANDS
# ============================================================================

command /mana:
	trigger:
		set {_current} to {Mana::%player's uuid%::current}
		set {_max} to GetMaxMana(player)
		set {_regen} to GetManaRegen(player)
		set {_percent} to GetManaPercent(player)
		
		send "&b&lโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”" to player
		send "&b&lMANA STATUS" to player
		send "" to player
		send "&7Mana: &b%{_current}%&7/&b%{_max}% &7(&3%{_percent}%&7)" to player
		send "&7Regen: &a+%{_regen}%/sec" to player
		send "" to player
		send "&b&lโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”" to player

command /manadebug:
	permission: op
	trigger:
		set {_current} to {Mana::%player's uuid%::current}
		set {_max} to GetMaxMana(player)
		set {_regen} to GetManaRegen(player)
		
		send "&b=== Mana Debug ===" to player
		send "Current: %{_current}%" to player
		send "Max: %{_max}%" to player
		send "Regen: %{_regen}%/sec" to player
		send "Base Max: %{ManaConfig::baseMax}%" to player
		send "Base Regen: %{ManaConfig::baseRegen}%" to player

# ============================================================================
# ADMIN COMMANDS
# ============================================================================

command /start:
	trigger:
		RaceTypeSelect(player)

command /race:
	trigger:
		send "&6You are a &5%{RaceType::%player's uuid%}%&6, your Subrace is &5%{RaceSubType1::%player's uuid%}%&6. You race class is currently lvl &5%{RaceLevel::%player's uuid%}%" to player

command /setlevel [] []:
	permission: op
	trigger:
		if arg-1 is not set:
			send "&cUsage: /setlevel [player] [level]" to player
		else if arg-2 is not set:
			send "&cUsage: /setlevel [player] [level]" to player
			stop
		
		set {Level::%arg-1's uuid%} to arg-2
		set {EXP::%arg-1's uuid%} to 0
		set {EXPN::%arg-1's uuid%} to round(1000 * (1.15 ^ arg-2))
		
		send "&aSet %arg-1%'s level to %arg-2%" to player
		send "&aYour level has been set to %arg-2%" to arg-1

command /giveexp [] []:
	permission: op
	trigger:
		if arg-1 is not set:
			send "&cUsage: /giveexp [player] [amount]" to player
		else if arg-2 is not set:
			send "&cUsage: /giveexp [player] [amount]" to player
			stop
		
		AwardExp(arg-1, arg-2, "&6&lADMIN &7+&a&l%arg-2% &r&7EXP")
		send "&aGave %arg-2% EXP to %arg-1%" to player

command /resetlevel []:
	permission: op
	trigger:
		if arg-1 is not set:
			set {_target} to player
		else:
			set {_target} to arg-1
		
		InitializePlayerLeveling({_target})
		
		send "&aReset %arg-1%'s leveling progress" to player
		send "&aYour leveling progress has been reset" to arg-1

command /leveltop:
	trigger:
		send "&6&lโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”" to player
		send "&6&l			TOP PLAYERS BY LEVEL" to player
		send "" to player
		
		# Create temporary list for sorting
		delete {_levels::*}
		loop all players:
			set {_uuid} to uuid of loop-player
			set {_level} to {Level::%{_uuid}%}
			if {_level} is not set:
				set {_level} to 1
			set {_levels::%{_level}%::%{_uuid}%} to loop-player's name
		
		# Display top 10
		set {_rank} to 1
		loop {_levels::*}:
			loop {_levels::%loop-index%::*}:
				if {_rank} <= 10:
					set {_playerName} to loop-value-2
					set {_level} to loop-index-2
					send "&e&l%{_rank}%. &7%{_playerName}% &8- &6Level %{_level}%" to player
					add 1 to {_rank}
		
		send "" to player
		send "&6&lโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”" to player

# ============================================================================
# MANA ADMIN COMMANDS
# ============================================================================

command /setmana [] []:
	permission: op
	trigger:
		if arg-1 is not set:
			send "&cUsage: /setmana [player] [amount]" to player
		else if arg-2 is not set:
			send "&cUsage: /setmana [player] [amount]" to player
			stop
		
		set {Mana::%arg-1's uuid%::current} to arg-2
		send "&aSet %arg-1%'s mana to %arg-2%" to player
		send "&aYour mana has been set to %arg-2%" to arg-1
		
		# Update boss bar if needed
		set {_max} to GetMaxMana(arg-1)
		if arg-2 < {_max}:
			UpdateManaBossBar(arg-1, arg-2, {_max})

command /setmaxmana []:
	permission: op
	trigger:
		if arg-1 is not set:
			send "&cUsage: /setmaxmana [amount]" to player
			stop
		
		set {ManaConfig::baseMax} to arg-1
		send "&aBase max mana set to %arg-1%" to player
		
		# Update all online players
		loop all players:
			set {_max} to GetMaxMana(loop-player)
			set {_current} to {Mana::%uuid of loop-player%::current}
			if {_current} > {_max}:
				set {Mana::%uuid of loop-player%::current} to {_max}

command /setmanaregen []:
	permission: op
	trigger:
		if arg-1 is not set:
			send "&cUsage: /setmanaregen [amount]" to player
			stop
		
		set {ManaConfig::baseRegen} to arg-1
		send "&aBase mana regeneration set to %arg-1%/sec" to player

command /restoremana [] []:
	permission: op
	trigger:
		if arg-1 is not set:
			send "&cUsage: /restoremana [player] [amount]" to player
		else if arg-2 is not set:
			send "&cUsage: /restoremana [player] [amount]" to player
			stop
		
		RestoreMana(arg-1, arg-2)
		send "&aRestored %arg-2% mana to %arg-1%" to player

# ============================================================================
# DEBUG COMMANDS (For Testing)
# ============================================================================

command /applymyskin:
    trigger:
        set {_model} to getPlayerModel(player)
        if {_model} is "SLIM":
            execute console command "skin %player% MySlimSkinName"
            send "Applied Slim variant!"
        else:
            execute console command "skin %player% MyClassicSkinName"
            send "Applied Classic variant!"


command /testoreexp []:
	permission: op
	trigger:
		if arg-1 is not set:
			send "&cUsage: /testoreexp [ore_type]" to player
			stop
		
		set {_exp} to GetOreExp(arg-1)
		send "&7Ore: &f%arg-1%" to player
		send "&7EXP Value: &a%{_exp}%" to player

command /testmobexp []:
	permission: op
	trigger:
		if arg-1 is not set:
			send "&cUsage: /testmobexp [mob_type]" to player
			stop
		
		set {_exp} to GetMobExp(arg-1)
		send "&7Mob: &f%arg-1%" to player
		send "&7EXP Value: &a%{_exp}%" to player

# ============================================================================
# RACE INVENTORIES (INVENTORY GUI)
# ============================================================================

function RaceTypeSelect(player: player):
	open chest inventory with 3 rows named "&5&l------ Race Types ------" to {_player}
	wait 1 tick
	set slot (all integers between 0 and 26) of {_player}'s current inventory to black stained glass pane named "&6 "
	set {_Humanoids} to player head
	set item flags of {_Humanoids} to hide enchants and hide attributes
	set slot 11 of {_player}'s current inventory to {_Humanoids} named "&6Humanoids"
	set {_Demi-Humans} to piglin head
	set item flags of {_Demi-Humans} to hide enchants and hide attributes
	set slot 13 of {_player}'s current inventory to {_Demi-Humans} named "&6Demi-Humans" 
	set {_Heteromorphs} to wither skeleton skull
	set item flags of {_Heteromorphs} to hide enchants and hide attributes
	set slot 15 of {_player}'s current inventory to {_Heteromorphs} named "&6Heteromorphs"

function RaceSubTypeSelectHeteromorph(player: player):
	open chest inventory with 3 rows named "&5&l-- Heteromorph Options --" to {_player}
	wait 1 tick
	set slot 0,8,9,17,18 and 26 of {_player}'s current inventory to black stained glass pane named "&6 "
	
	set {_head} to player head
	set item flags of {_head} to hide enchants and hide attributes
	set {_v} to "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvY2IyOWNmM2JmMmYyNzk1MzM4OGQ5NTYzYmY5ZTgzYmIxYWVkZmM0NzA1ZjNmYTdjNzc0OGYwYTc5NzY2Y2Q5ZSJ9fX0="
	set {_nbt} to nbt compound from "{profile:{properties:[{name:""textures"",value:""%{_v}%""}]}}"
	set {_head} to player head with nbt {_nbt}
	set item flags of {_head} to hide enchants and hide attributes
	set slot 1 of {_player}'s current inventory to {_head} named "&6Skeleton"
	
	set {_v} to "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOTAyOGRmMmMxMGM0YmVjOWNmNmZkNjlmZWIyMTUzMDQ2OThmYTk4OTE1ZmQyNWE4ZjZiZGZlMjlmZDIzMjZjYyJ9fX0="
	set {_nbt} to nbt compound from "{profile:{properties:[{name:""textures"",value:""%{_v}%""}]}}"
	set {_head} to player head with nbt {_nbt}
	set item flags of {_head} to hide enchants and hide attributes
	set slot 2 of {_player}'s current inventory to {_head} named "&6Zombie"
	
	set {_v} to "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMmQ4YjY5NTQ1YzE0YjEyZGViMzk5OWFmMzFhYTVkZGFlNGNlMzllNDdjYjIwNmJmZjE5ODA4N2FkYjQxOGQ3NiJ9fX0="
	set {_nbt} to nbt compound from "{profile:{properties:[{name:""textures"",value:""%{_v}%""}]}}"
	set {_head} to player head with nbt {_nbt}
	set item flags of {_head} to hide enchants and hide attributes
	set slot 3 of {_player}'s current inventory to {_head} named "&6Slime"

function RaceSubTypeSelectDemiHuman(player: player):
	open chest inventory with 3 rows named "&5&l -- Demi-Human Options --" to {_player}
	wait 1 tick
	set slot 0,8,9,17,18 and 26 of {_player}'s current inventory to black stained glass pane named "&6 "
	
	set {_head} to player head
	set item flags of {_head} to hide enchants and hide attributes
	set {_v} to "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYzZlMjI2MzU2OTkyN2NmMmJlMjFlMmM4NzIyZTY5ZmMzNzQwNDllOTk2YWVhYmFhMjRmNWY0MGE3N2E2MDk3ZSJ9fX0="
	set {_nbt} to nbt compound from "{profile:{properties:[{name:""textures"",value:""%{_v}%""}]}}"
	set {_head} to player head with nbt {_nbt}
	set item flags of {_head} to hide enchants and hide attributes
	set slot 1 of {_player}'s current inventory to {_head} named "&6Lizardman"
	
	set {_v} to "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNWIyMGZmNzE2NWRjZmRkY2EyOWVmNTBhNDljZTliMTQ1YTM5ZTAyYmUzZjdlZDAwMjM3YjIwY2VjZGZhNWNjOCJ9fX0="
	set {_nbt} to nbt compound from "{profile:{properties:[{name:""textures"",value:""%{_v}%""}]}}"
	set {_head} to player head with nbt {_nbt}
	set item flags of {_head} to hide enchants and hide attributes
	set slot 2 of {_player}'s current inventory to {_head} named "&6Orc"
	
	set {_v} to "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZDJkMDRhZmU0MWExNTllY2IzMTA2OTNiNDk0OTI1NzA3NTFhYjhmZTRjMTRjOGE4NzZkM2IxZjJkNWRjNzNjMCJ9fX0="
	set {_nbt} to nbt compound from "{profile:{properties:[{name:""textures"",value:""%{_v}%""}]}}"
	set {_head} to player head with nbt {_nbt}
	set item flags of {_head} to hide enchants and hide attributes
	set slot 3 of {_player}'s current inventory to {_head} named "&6Minotaur"

function RaceSubTypeSelectHumanoid(player: player):
	open chest inventory with 3 rows named "&5&l --- Humanoid Options ---" to {_player}
	wait 1 tick
	set slot 0,8,9,17,18 and 26 of {_player}'s current inventory to black stained glass pane named "&6 "
	
	set {_v} to "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMTdlNGEzMTYzMjJmZjE0YjhiZGM4YzljYmUwNzUxZjA2ZDE3OThiMjJjMzQ5MjlhOGNkNDAzODExNjY3YjM3YiJ9fX0="
	set {_nbt} to nbt compound from "{profile:{properties:[{name:""textures"",value:""%{_v}%""}]}}"
	set {_head} to player head with nbt {_nbt}
	set item flags of {_head} to hide enchants and hide attributes
	set slot 1 of {_player}'s current inventory to {_head} named "&6Human"
	
	set {_v} to "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZjczMGM2NzBhNWZjNjJmOGEwNDNkYjQ0ZWZhNTAzMmY2MTFiOTZkNDllOGMwNDc2NjYxNWU0ZTA1ZTgyYWYifX19"
	set {_nbt} to nbt compound from "{profile:{properties:[{name:""textures"",value:""%{_v}%""}]}}"
	set {_head} to player head with nbt {_nbt}
	set item flags of {_head} to hide enchants and hide attributes
	set slot 2 of {_player}'s current inventory to {_head} named "&6Elf"
	
	set {_v} to "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMzIxNmEwYTU3ZjE2NWM3ZTZkYmM3MjJmNTI5NmZhNWI5N2M1YzJjNGJjYjg3MWE3YjJjYTFjNDY0YWI4ZGY2NCJ9fX0="
	set {_nbt} to nbt compound from "{profile:{properties:[{name:""textures"",value:""%{_v}%""}]}}"
	set {_head} to player head with nbt {_nbt}
	set item flags of {_head} to hide enchants and hide attributes
	set slot 3 of {_player}'s current inventory to {_head} named "&6Dwarf"

# ============================================================================
# RACE INVENTORIES LOGIC (INVENTORY GUI LOGIC)
# ============================================================================

on inventory click:
	if name of event-inventory is "&5&l------ Race Types ------":
		cancel event
		if clicked slot is 11:
			set {RaceType::%player's uuid%} to "Humanoid"
			send "&5Updated Race Type: &l%{RaceType::%player's uuid%}%" to player
			RaceSubTypeSelectHumanoid(player)
		else if clicked slot is 13:
			set {RaceType::%player's uuid%} to "Demi-Human"
			send "&5Updated Race Type: &l%{RaceType::%player's uuid%}%" to player
			RaceSubTypeSelectDemiHuman(player)
		else if clicked slot is 15:
			set {RaceType::%player's uuid%} to "Heteromorph"
			send "&5Updated Race Type: &l%{RaceType::%player's uuid%}%" to player
			RaceSubTypeSelectHeteromorph(player)
	else if name of event-inventory is "&5&l-- Heteromorph Options --":
		cancel event
		if clicked slot is 1:
			set {RaceSubType1::%player's uuid%} to "Skeleton"
			send "&5Updated Race Sub-Type: &l%{RaceSubType1::%player's uuid%}%" to player
			set {RaceLevel::%player's uuid%} to 1
			set {_model} to getPlayerModel(player)
			if {_model} is "SLIM":
				execute console command "skin set skeleton_slim %player%"
			else:
				execute console command "skin set skeleton_classic %player%"

		else if clicked slot is 2:
			set {RaceSubType1::%player's uuid%} to "Zombie"
			send "&5Updated Race Sub-Type: &l%{RaceSubType1::%player's uuid%}%" to player
			set {RaceLevel::%player's uuid%} to 1
			set {_model} to getPlayerModel(player)
			if {_model} is "SLIM":
				execute console command "skin set zombie_slim %player%"
			else:
				execute console command "skin set zombie_classic %player%"

		else if clicked slot is 3:
			set {RaceSubType1::%player's uuid%} to "Slime"
			send "&5Updated Race Sub-Type: &l%{RaceSubType1::%player's uuid%}%" to player
			set {RaceLevel::%player's uuid%} to 1
			set {_model} to getPlayerModel(player)
			if {_model} is "SLIM":
				execute console command "skin set slime_slim %player%"
			else:
				execute console command "skin set slime_classic %player%"

	else if name of event-inventory is "&5&l --- Humanoid Options ---":
		cancel event
		if clicked slot is 1:
			set {RaceSubType1::%player's uuid%} to "Human"
			send "&5Updated Race Sub-Type: &l%{RaceSubType1::%player's uuid%}%" to player
			set {RaceLevel::%player's uuid%} to 1
			set {_model} to getPlayerModel(player)
			if {_model} is "SLIM":
				execute console command "skin set human_slim %player%"
			else:
				execute console command "skin set human_classic %player%"

		else if clicked slot is 2:
			set {RaceSubType1::%player's uuid%} to "Elf"
			send "&5Updated Race Sub-Type: &l%{RaceSubType1::%player's uuid%}%" to player
			set {RaceLevel::%player's uuid%} to 1
			set {_model} to getPlayerModel(player)
			if {_model} is "SLIM":
				execute console command "skin set elf_slim %player%"
			else:
				execute console command "skin set elf_classic %player%"

		else if clicked slot is 3:
			set {RaceSubType1::%player's uuid%} to "Dwarf"
			send "&5Updated Race Sub-Type: &l%{RaceSubType1::%player's uuid%}%" to player
			set {RaceLevel::%player's uuid%} to 1
			set {_model} to getPlayerModel(player)
			if {_model} is "SLIM":
				execute console command "skin set dwarf_slim %player%"
			else:
				execute console command "skin set dwarf_classic %player%"

	else if name of event-inventory is "&5&l -- Demi-Human Options --":
		cancel event
		if clicked slot is 1:
			set {RaceSubType1::%player's uuid%} to "Lizardman"
			send "&5Updated Race Sub-Type: &l%{RaceSubType1::%player's uuid%}%" to player
			set {RaceLevel::%player's uuid%} to 1
			set {_model} to getPlayerModel(player)
			if {_model} is "SLIM":
				execute console command "skin set lizardman_slim %player%"
			else:
				execute console command "skin set lizardman_classic %player%"
		else if clicked slot is 2:
			set {RaceSubType1::%player's uuid%} to "Orc"
			send "&5Updated Race Sub-Type: &l%{RaceSubType1::%player's uuid%}%" to player
			set {RaceLevel::%player's uuid%} to 1
			set {_model} to getPlayerModel(player)
			if {_model} is "SLIM":
				execute console command "skin set orc_slim %player%"
			else:
				execute console command "skin set orc_classic %player%"
		else if clicked slot is 3:
			set {RaceSubType1::%player's uuid%} to "Minotaur"
			send "&5Updated Race Sub-Type: &l%{RaceSubType1::%player's uuid%}%" to player
			set {RaceLevel::%player's uuid%} to 1
			set {_model} to getPlayerModel(player)
			if {_model} is "SLIM":
				execute console command "skin set minotaur_slim %player%"
			else:
				execute console command "skin set minotaur_classic %player%"
Kodari AI
KodariMar 7 at 10:15 am 22,837 (v2)

Iโ€™ll create an optimized level-up choice system based on race types with minimal changes to the existing code.

Plan:

  • Modify PerformLevelUp to handle race-specific rewards

  • Add /levelup command with inventory GUI

  • Add choice tracking variable and GUI handler

  • Humans get 1 skill point automatically, others choose in GUI

Done! Iโ€™ve created an optimized race-based level-up system with minimal changes to your existing code.

Key Changes:

  • Humanoids: Automatically receive 1 Skill Point on level up (no choice needed)

  • Demi-Humans & Heteromorphs: See a message prompting them to use /levelup to choose their reward

  • /levelup opens a GUI where players can choose between Skill Points (2 for Demi-Humans, 3 for Heteromorphs) or +1 Racial Class Level

  • Pending choices stack if players level up multiple times

  • Modified /level command to show pending choices

What was modified:

  • PerformLevelUp() - Added race-type checking

  • PlayLevelUpEffects() - Added customizable reward message

  • Added /levelup command and GUI system

  • Added inventory click handler for the choice GUI

Place this in plugins/Skript/scripts/leveling_system.sk and reload with /sk reload leveling_system

Kodari can make mistakes. Review important code before using.
Files
leveling_system.sk
Code
1 840
leveling_system.sk
# ============================================================================
# ON JOIN FUNCTIONS
# ============================================================================
on join:
	if {RaceType::%player's uuid%} is not set:
		RaceTypeSelect(player)
	if {PlayerLevel::%player's uuid%} is not set:
		set {PlayerLevel::%player's uuid%} to 0
	if {PlayerLevelEXP::%player's uuid%} is not set:
		set {PlayerLevelEXP::%player's uuid%} to 0
	if {JobLevel::%player's uuid%} is not set:
		set {JobLevel::%player's uuid%} to 0
	if {ClassLevel::%player's uuid%} is not set:
		set {ClassLevel::%player's uuid%} to 0
	if {Mana::%player's uuid%::current} is not set:
		InitializePlayerMana(player)

# ============================================================================
# SKIN RESTORER FUNCTIONS
# ============================================================================

import:
    com.destroystokyo.paper.profile.PlayerProfile

function getPlayerModel(p: player) :: string:
    set {_profile} to {_p}.getPlayerProfile()
    set {_textures} to {_profile}.getTextures()
    set {_model} to "%{_textures}.getSkinModel()%"
    
    if {_model} is "SLIM":
        return "SLIM"
    else:
        return "CLASSIC"


# ============================================================================
# MANA SYSTEM - CONFIGURATION & INITIALIZATION
# ============================================================================

on script load:
	set {ManaConfig::baseMax} to 100
	set {ManaConfig::baseRegen} to 5

function InitializePlayerMana(player: player):
	set {Mana::%{_player}'s uuid%::current} to GetMaxMana({_player})
	set {Mana::%{_player}'s uuid%::bossbarVisible} to false

# ============================================================================
# MANA SYSTEM - DYNAMIC MAX MANA CALCULATION
# ============================================================================

function GetMaxMana(player: player) :: number:
	set {_base} to {ManaConfig::baseMax}
	return {_base}

# ============================================================================
# MANA SYSTEM - DYNAMIC REGEN RATE CALCULATION
# ============================================================================

function GetManaRegen(player: player) :: number:
	set {_base} to {ManaConfig::baseRegen}
	return {_base}

# ============================================================================
# MANA SYSTEM - REGENERATION LOOP (OPTIMIZED)
# ============================================================================

every 5 seconds:
	loop all players:
		set {_uuid} to uuid of loop-player
		set {_current} to {Mana::%{_uuid}%::current}
		set {_max} to GetMaxMana(loop-player)
		
		if {_current} < {_max}:
			set {_regen} to GetManaRegen(loop-player)
			set {_newMana} to {_current} + {_regen}
			if {_newMana} > {_max}:
				set {_newMana} to {_max}
			set {Mana::%{_uuid}%::current} to {_newMana}
			UpdateManaBossBar(loop-player, {_newMana}, {_max})
		else if {Mana::%{_uuid}%::bossbarVisible} is true:
			HideManaBossBar(loop-player)

# ============================================================================
# MANA SYSTEM - BOSS BAR FUNCTIONS
# ============================================================================

function UpdateManaBossBar(player: player, current: number, max: number):
	set {_uuid} to uuid of {_player}
	set {_progress} to ({_current} / {_max}) * 100
	set {_barId} to "mana_%uuid of {_player}%"
	delete boss bar with id {_barId}
	set {_barTitle} to "&b&lMana &3%{_current}%&7/&3%{_max}%"
	set {_bar} to boss bar with id {_barId} with title {_barTitle} with color blue with progress {_progress}
	add {_player} to {_bar}
	set {Mana::%{_uuid}%::bossbarVisible} to true

function HideManaBossBar(player: player):
	set {_barId} to "mana_%uuid of {_player}%"
	delete boss bar with id {_barId}
	set {Mana::%uuid of {_player}%::bossbarVisible} to false

# ============================================================================
# MANA SYSTEM - UTILITY FUNCTIONS
# ============================================================================

function HasMana(player: player, amount: number) :: boolean:
	return {Mana::%uuid of {_player}%::current} >= {_amount}

function ConsumeMana(player: player, amount: number) :: boolean:
	set {_uuid} to uuid of {_player}
	set {_current} to {Mana::%{_uuid}%::current}
	
	if {_current} >= {_amount}:
		set {_newMana} to {_current} - {_amount}
		set {Mana::%{_uuid}%::current} to {_newMana}
		if {_newMana} < GetMaxMana({_player}):
			UpdateManaBossBar({_player}, {_newMana}, GetMaxMana({_player}))
		return true
	else:
		return false

function RestoreMana(player: player, amount: number):
	set {_uuid} to uuid of {_player}
	set {_current} to {Mana::%{_uuid}%::current}
	set {_max} to GetMaxMana({_player})
	set {_newMana} to {_current} + {_amount}
	if {_newMana} > {_max}:
		set {_newMana} to {_max}
	set {Mana::%{_uuid}%::current} to {_newMana}
	if {_newMana} < {_max}:
		UpdateManaBossBar({_player}, {_newMana}, {_max})

function GetManaPercent(player: player) :: number:
	set {_current} to {Mana::%uuid of {_player}%::current}
	set {_max} to GetMaxMana({_player})
	return ({_current} / {_max}) * 100

# ============================================================================
# ANTI-EXPLOIT: TRACK PLACED BLOCKS
# ============================================================================

on place:
	set metadata value "placedByPlayer" of event-block to true

# ============================================================================
# PLAYER INITIALIZATION
# ============================================================================

on first join:
	InitializePlayerLeveling(player)

on join:
	if {Level::%player's uuid%} is not set:
		InitializePlayerLeveling(player)

function InitializePlayerLeveling(player: player):
	set {Level::%{_player}'s uuid%} to 1
	set {EXP::%{_player}'s uuid%} to 0
	set {EXPN::%{_player}'s uuid%} to 1000
	set {Statpoints::%{_player}'s uuid%} to 0
	set {Stats::%{_player}'s uuid%::oresMined} to 0
	set {Stats::%{_player}'s uuid%::mobsKilled} to 0
	set {Stats::%{_player}'s uuid%::totalExpGained} to 0
	set {Stats::%{_player}'s uuid%::levelsGained} to 0

# ============================================================================
# CONFIGURATION - MOB GROUPS AND EXP VALUES
# ============================================================================

on script load:
	set {MobGroups::passive::*} to "pig", "cow", "sheep", "chicken", "rabbit", "salmon", "cod", "squid", "glow squid"
	set {MobGroups::passive::exp} to 5
	set {MobGroups::neutral::*} to "spider", "enderman", "zombified piglin", "wolf", "bee", "dolphin", "panda", "polar bear"
	set {MobGroups::neutral::exp} to 15
	set {MobGroups::hostile::*} to "zombie", "skeleton", "creeper", "drowned", "husk", "stray", "phantom", "silverfish", "slime", "magma cube"
	set {MobGroups::hostile::exp} to 25
	set {MobGroups::dangerous::*} to "witch", "vindicator", "pillager", "evoker", "vex", "guardian", "hoglin", "zoglin", "blaze"
	set {MobGroups::dangerous::exp} to 75
	set {MobGroups::boss::*} to "ender dragon", "wither", "warden", "elder guardian", "ravager"
	set {MobGroups::boss::exp} to 1000

# ============================================================================
# CONFIGURATION - ORE GROUPS AND EXP VALUES
# ============================================================================

on script load:
	set {OreGroups::common::*} to "coal ore", "deepslate coal ore", "copper ore", "deepslate copper ore"
	set {OreGroups::common::exp} to 15
	set {OreGroups::uncommon::*} to "iron ore", "deepslate iron ore", "redstone ore", "deepslate redstone ore", "nether gold ore", "nether quartz ore"
	set {OreGroups::uncommon::exp} to 25
	set {OreGroups::rare::*} to "gold ore", "deepslate gold ore", "lapis lazuli ore", "deepslate lapis lazuli ore"
	set {OreGroups::rare::exp} to 50
	set {OreGroups::epic::*} to "emerald ore", "deepslate emerald ore", "diamond ore", "deepslate diamond ore"
	set {OreGroups::epic::exp} to 150
	set {OreGroups::legendary::*} to "ancient debris"
	set {OreGroups::legendary::exp} to 500

# ============================================================================
# MINING EXP SYSTEM