staticsurge0

this is my skript for a genraid server, im only using skirpt, sk-bee, and sk particle and no other plugin, in my code the gens and scoreboard are suposed to be like this in the ss i provided pls fix my code

--- 📎 Attached 1 file(s):

File: pasted-code-1781852145665.txt

txt
# =========================================================================
# COAL GENERATOR SYSTEM (ARMOR STAND GEOMETRY FIX)
# =========================================================================

options:
	# Base structural block for the generator 
	GenBlock: gray stained glass
	
	# Limits and pricing configurations
	MaxGens: 4
	ItemPrice: 1

# --- 1. COMMAND TO GET THE GENERATOR ---
command /givegen [<player>]:
	permission: admin.gens
	permission message: &cYou do not have permission to execute this administrative action.
	trigger:
		if argument 1 is not set:
			send "&cSyntax Error! Usage: /givegen <player>" to player
			stop
		
		give arg-1 1 {@GenBlock} named "&fCoal Generator Tier 1" with lore " " and "Generates banknotes worth" and "&a$1 &fevery 10 seconds." and " " and "&fUpgrade this generator by" and "doing &eShift + Right Click"
		send "&aSuccessfully gave 1x &fCoal Generator Tier 1 to &e%arg-1%&a." to player
		send "&aYou received 1x &fCoal Generator Tier 1&a!" to arg-1

# --- 2. TRACK PLACING GENERATORS (ARMOR STAND MARKER METHOD) ---
on place of {@GenBlock}:
	if name of player's tool is "&fCoal Generator Tier 1":
		if {placed_gens::%player's uuid%} is not set:
			set {placed_gens::%player's uuid%} to 0
			
		if {placed_gens::%player's uuid%} >= {@MaxGens}:
			cancel event
			send "&cLimit Exceeded! You can only place a maximum of {@MaxGens} Generators." to player
			stop
			
		add 1 to {placed_gens::%player's uuid%}
		set {_loc} to location of event-block
		add {_loc} to {gen_locations::%player's uuid%::*}
		
		# Exact center grids
		set {_x} to "%floor(x-coordinate of {_loc}) + 0.5%"
		set {_z} to "%floor(z-coordinate of {_loc}) + 0.5%"
		
		# Y-offsets adjusted perfectly for a small armor stand head position
		set {_as_y} to "%floor(y-coordinate of {_loc}) - 0.45%"
		set {_text_y} to "%floor(y-coordinate of {_loc}) + 1.35%"
		
		# Clear out syntax-breaking commas
		replace all "," with "" in {_x}
		replace all "," with "" in {_as_y}
		replace all "," with "" in {_text_y}
		replace all "," with "" in {_z}
		
		# Summon an invisible, no-hitbox small armor stand holding coal ore on its head
		execute console command "execute at %player% run summon armor_stand %{_x}% %{_as_y}% %{_z}% {Tags:[""gen_display""],Invisible:1b,Small:1b,Marker:1b,NoGravity:1b,ArmorItems:[{},{},{},{id:""minecraft:coal_ore"",count:1}]}"
		
		# Summon the crisp green floating text slightly higher above the glass surface
		execute console command "execute at %player% run summon text_display %{_x}% %{_text_y}% %{_z}% {Tags:[""gen_display""],text:'{""text"":""§a§l$1""}',background:0,transformation:{scale:[1.2f,1.2f,1.2f]}}"
		
		send "&aGenerator Placed! &7(%{placed_gens::%player's uuid%}%/{@MaxGens})" to player
	else:
		stop

# --- 3. TRACK BREAKING GENERATORS ---
on break of {@GenBlock}:
	if {gen_locations::%player's uuid%::*} contains location of event-block:
		remove location of event-block from {gen_locations::%player's uuid%::*}
		subtract 1 from {placed_gens::%player's uuid%}
		
		set {_loc} to location of event-block
		set {_x} to floor(x-coordinate of {_loc}) + 0.5
		set {_y} to floor(y-coordinate of {_loc}) + 0.5
		set {_z} to floor(z-coordinate of {_loc}) + 0.5
		set {_sx} to "%{_x}%"
		set {_sy} to "%{_y}%"
		set {_sz} to "%{_z}%"
		replace all "," with "" in {_sx}
		replace all "," with "" in {_sy}
		replace all "," with "" in {_sz}
		
		# Clears both the armor stands and text holograms instantly within the block area
		execute console command "execute at %player% run kill @e[tag=gen_display,x=%{_sx}%,y=%{_sy}%,z=%{_sz}%,distance=..1.5]"
		
		send "&cGenerator Destroyed! &7(%{placed_gens::%player's uuid%}%/{@MaxGens})" to player
		
		cancel event
		set event-block to air
		drop 1 {@GenBlock} named "&fCoal Generator Tier 1" with lore " " and "Generates banknotes worth" and "&a$1 &fevery 10 seconds." and " " and "&fUpgrade this generator by" and "doing &eShift + Right Click" at event-block

# --- 4. DELETE ALL PLACED GENERATORS COMMAND ---
command /deleteallgens [<text>]:
	trigger:
		if argument 1 is not "confirm":
			send " " to player
			send "&c&l⚠️ DANGER ZONE ⚠️" to player
			send "&7This action will delete all of your placed generators." to player
			send "&7You will &c&lNOT &7get your generator items back!" to player
			send "&fTo proceed anyway, type: &e/deleteallgens confirm" to player
			send " " to player
			stop
			
		if {placed_gens::%player's uuid%} is not set:
			set {placed_gens::%player's uuid%} to 0
			
		if {placed_gens::%player's uuid%} <= 0:
			send "&cYou do not have any active generators deployed right now." to player
			stop
			
		loop {gen_locations::%player's uuid%::*}:
			set {_loc} to loop-value
			set block at {_loc} to air
			
			set {_x} to floor(x-coordinate of {_loc}) + 0.5
			set {_y} to floor(y-coordinate of {_loc}) + 0.5
			set {_z} to floor(z-coordinate of {_loc}) + 0.5
			set {_sx} to "%{_x}%"
			set {_sy} to "%{_y}%"
			set {_sz} to "%{_z}%"
			replace all "," with "" in {_sx}
			replace all "," with "" in {_sy}
			replace all "," with "" in {_sz}
			execute console command "execute at %player% run kill @e[tag=gen_display,x=%{_sx}%,y=%{_sy}%,z=%{_sz}%,distance=..1.5]"
			
		delete {gen_locations::%player's uuid%::*}
		set {placed_gens::%player's uuid%} to 0
		send "&a&lPURGE COMPLETE &7» &fAll deployed generator units have been deleted successfully." to player

# --- 5. GENERATOR TICK SYSTEM (10 SECONDS INTERVAL) ---
every 10 seconds:
	loop all players:
		if {placed_gens::%loop-player's uuid%} is set:
			loop {gen_locations::%loop-player's uuid%::*}:
				if block at loop-value-2 is {@GenBlock}:
					drop 1 iron nugget named "&8Coal Gen Drop" with lore "&7Right-click to claim!" and "&eValue: $1" at block 1 above loop-value-2 without velocity
				else:
					remove loop-value-2 from {gen_locations::%loop-player's uuid%::*}

# --- 6. RIGHT-CLICK TO CLAIM DROP ---
on right click holding iron nugget:
	if name of player's tool is "&8Coal Gen Drop":
		cancel event
		set {_amt} to amount of player's tool
		
		remove {_amt} of player's tool from player's inventory
		set {_earnings} to {_amt} * {@ItemPrice}
		add {_earnings} to {balance::%player's uuid%}
		
		send action bar "&a+$%{_earnings}% &7from claiming drops! | Balance: $%{balance::%player's uuid%}%" to player

# --- 7. SELL ALL COMMAND ---
command /sellall:
	trigger:
		set {_count} to amount of iron nugget named "&8Coal Gen Drop" in player's inventory
		
		if {_count} > 0:
			remove {_count} of iron nugget named "&8Coal Gen Drop" from player's inventory
			set {_earnings} to {_count} * {@ItemPrice}
			add {_earnings} to {balance::%player's uuid%}
			
			send "&a&lSELLALL &7» &aYou sold &e%{_count}% &aCoal Drops for &e$%{_earnings}%&a!" to player
		else:
			send "&c&lSELLALL &7» &cYou do not have any coal generator drops in your inventory!" to player

# --- 8. CORE KILLS TRACKER SYSTEM ---
on death of player:
	if attacker is a player:
		if {kills::%attacker's uuid%} is not set:
			set {kills::%attacker's uuid%} to 0
		add 1 to {kills::%attacker's uuid%}

# --- 9. ADMINISTRATIVE SETMONEY COMMAND ---
command /setmoney [<player>] [<number>]:
	permission: admin.money
	permission message: &cYou do not have permission to execute this administrative action.
	trigger:
		if argument 1 is not set:
			send "&cSyntax Error! Usage: /setmoney <player> <amount>" to player
			stop
		if argument 2 is not set:
			send "&cSyntax Error! Usage: /setmoney <player> <amount>" to player
			stop
		
		set {balance::%arg-1's uuid%} to arg-2
		send "&aSuccessfully configured &e%arg-1%'s &abalance metric to &e$%arg-2%&a." to player
		send "&aYour global balance account has been set to &e$%arg-2% &aby an operator." to arg-1

# --- 10. DATA INITIATION ON JOIN ---
on join:
	if {balance::%player's uuid%} is not set:
		set {balance::%player's uuid%} to 0
	if {placed_gens::%player's uuid%} is not set:
		set {placed_gens::%player's uuid%} to 0
	if {kills::%player's uuid%} is not set:
		set {kills::%player's uuid%} to 0
3 images attached
staticsurge0

uh

1 image attached
Kodari AI
KodariJun 19 at 7:03 am 3

The error is clear — signs only have 4 lines (1–4), but your script is trying to set lines 7–14. I need to see the file to fix it.

Can you paste the contents of your genskript.sk file (especially around lines 85–105)? The error is straightforward — signs only support 4 lines max, but your script sets lines 7 through 14. I just need to see the code to fix the logic.

[Generation stopped]

staticsurge0
📎 1 file 14,968 chars
📄
pasted-code-1781852623106.txt
txt 349 lines
▶
# =========================================================================
# GENUST - GEN RAID SERVER CORE SCRIPT
# Requires: Skript, SkBee, SkParticle
# =========================================================================

options:
    # Base structural block for the generator
    GenBlock: gray stained glass

    # Limits and pricing
    MaxGens: 5
    ItemPrice: 1

    # Scoreboard store tag
    StoreTag: &astore.jozmc.net

# =========================================================================
# SCOREBOARD SYSTEM (SkBee Boards)
# =========================================================================

# Returns a 3-letter month abbreviation from a month number
function getMonthName(m: integer) :: text:
    if {_m} = 1:
        return "Jan"
    if {_m} = 2:
        return "Feb"
    if {_m} = 3:
        return "Mar"
    if {_m} = 4:
        return "Apr"
    if {_m} = 5:
        return "May"
    if {_m} = 6:
        return "Jun"
    if {_m} = 7:
        return "Jul"
    if {_m} = 8:
        return "Aug"
    if {_m} = 9:
        return "Sep"
    if {_m} = 10:
        return "Oct"
    if {_m} = 11:
        return "Nov"
    return "Dec"

# Rebuilds and shows the scoreboard for a player
function updateBoard(p: player):
    set {_uuid} to uuid of {_p}

    # Load stats with safe fallbacks
    set {_level} to {level::%{_uuid}%}
    if {_level} is not set:
        set {_level} to 1
    set {_xp} to {xp::%{_uuid}%}
    if {_xp} is not set:
        set {_xp} to 0
    set {_bal} to {balance::%{_uuid}%}
    if {_bal} is not set:
        set {_bal} to 0
    set {_gems} to {gems::%{_uuid}%}
    if {_gems} is not set:
        set {_gems} to 0
    set {_credits} to {credits::%{_uuid}%}
    if {_credits} is not set:
        set {_credits} to 0
    set {_kills} to {kills::%{_uuid}%}
    if {_kills} is not set:
        set {_kills} to 0
    set {_gens} to {placed_gens::%{_uuid}%}
    if {_gens} is not set:
        set {_gens} to 0

    # XP percentage toward next level (100 XP per level)
    set {_xp_needed} to {_level} * 100
    set {_xp_pct} to floor({_xp} * 100 / {_xp_needed})

    # Format balance to 2 decimal places
    set {_bal_str} to "%floor({_bal} * 100) / 100%"

    # Build date string: "Jun 19, 2026"
    set {_month_name} to getMonthName(month of now)
    set {_date} to "&8⏰ &7%{_month_name}% %day of now%, %year of now%"

    # Create board if not already assigned
    if board of {_p} is not set:
        set board of {_p} to new board with title "&6&lGENUST"

    set {_b} to board of {_p}
    set title of {_b} to "&6&lGENUST"

    # Lines: higher number = higher on scoreboard
    set line 15 of {_b} to {_date}
    set line 14 of {_b} to " "
    set line 13 of {_b} to "&7Level: &e%{_level}%&6★ &7(%{_xp_pct}%%)"
    set line 12 of {_b} to "  "
    set line 11 of {_b} to "&7Balance: &a$%{_bal_str}%"
    set line 10 of {_b} to "&7Gems: &b✧%{_gems}%"
    set line 9 of {_b} to "   "
    set line 8 of {_b} to "&7Credits: &6🪙%{_credits}%"
    set line 7 of {_b} to "    "
    set line 6 of {_b} to "&7Kills: &f%{_kills}%"
    set line 5 of {_b} to "&7Generators: &f%{_gens}%/{@MaxGens}"
    set line 4 of {_b} to "     "
    set line 3 of {_b} to "{@StoreTag}"

# Update all online players' scoreboards every 2 seconds
every 2 seconds:
    loop all players:
        updateBoard(loop-player)

# Show scoreboard immediately on join
on join:
    wait 5 ticks
    updateBoard(player)

# =========================================================================
# COMMAND: /givegen - Give a generator to a player
# =========================================================================
command /givegen []:
    permission: admin.gens
    permission message: &cYou do not have permission to execute this administrative action.
    trigger:
        if argument 1 is not set:
            send "&cSyntax Error! Usage: /givegen " to player
            stop

        give arg-1 1 {@GenBlock} named "&fCoal Generator Tier 1" with lore " " and "&7Generates banknotes worth" and "&a$1 &7every 10 seconds." and " " and "&7Upgrade this generator by" and "doing &eShift + Right Click"
        send "&aSuccessfully gave 1x &fCoal Generator Tier 1 &ato &e%arg-1%&a." to player
        send "&aYou received 1x &fCoal Generator Tier 1&a!" to arg-1

# =========================================================================
# GENERATOR PLACEMENT
# =========================================================================
on place of {@GenBlock}:
    if name of player's tool is "&fCoal Generator Tier 1":
        if {placed_gens::%player's uuid%} is not set:
            set {placed_gens::%player's uuid%} to 0

        if {placed_gens::%player's uuid%} >= {@MaxGens}:
            cancel event
            send "&cLimit Exceeded! You can only place a maximum of {@MaxGens} Generators." to player
            stop

        add 1 to {placed_gens::%player's uuid%}
        set {_loc} to location of event-block
        add {_loc} to {gen_locations::%player's uuid%::*}

        # Center the display entities on the block grid
        set {_x} to "%floor(x-coordinate of {_loc}) + 0.5%"
        set {_z} to "%floor(z-coordinate of {_loc}) + 0.5%"
        set {_as_y} to "%floor(y-coordinate of {_loc}) - 0.45%"
        set {_text_y} to "%floor(y-coordinate of {_loc}) + 1.35%"

        replace all "," with "" in {_x}
        replace all "," with "" in {_as_y}
        replace all "," with "" in {_text_y}
        replace all "," with "" in {_z}

        # Invisible small armor stand with coal ore on head
        execute console command "execute at %player% run summon armor_stand %{_x}% %{_as_y}% %{_z}% {Tags:[""gen_display""],Invisible:1b,Small:1b,Marker:1b,NoGravity:1b,ArmorItems:[{},{},{},{id:""minecraft:coal_ore"",count:1}]}"

        # Floating $1 text display above the block
        execute console command "execute at %player% run summon text_display %{_x}% %{_text_y}% %{_z}% {Tags:[""gen_display""],text:'{""text"":""§a§l$1""}',background:0,transformation:{scale:[1.2f,1.2f,1.2f]}}"

        send "&aGenerator Placed! &7(%{placed_gens::%player's uuid%}%/{@MaxGens})" to player
    else:
        stop

# =========================================================================
# GENERATOR BREAKING
# =========================================================================
on break of {@GenBlock}:
    if {gen_locations::%player's uuid%::*} contains location of event-block:
        remove location of event-block from {gen_locations::%player's uuid%::*}
        subtract 1 from {placed_gens::%player's uuid%}

        set {_loc} to location of event-block
        set {_x} to floor(x-coordinate of {_loc}) + 0.5
        set {_y} to floor(y-coordinate of {_loc}) + 0.5
        set {_z} to floor(z-coordinate of {_loc}) + 0.5
        set {_sx} to "%{_x}%"
        set {_sy} to "%{_y}%"
        set {_sz} to "%{_z}%"
        replace all "," with "" in {_sx}
        replace all "," with "" in {_sy}
        replace all "," with "" in {_sz}

        execute console command "execute at %player% run kill @e[tag=gen_display,x=%{_sx}%,y=%{_sy}%,z=%{_sz}%,distance=..1.5]"

        send "&cGenerator Destroyed! &7(%{placed_gens::%player's uuid%}%/{@MaxGens})" to player

        cancel event
        set event-block to air
        drop 1 {@GenBlock} named "&fCoal Generator Tier 1" with lore " " and "&7Generates banknotes worth" and "&a$1 &7every 10 seconds." and " " and "&7Upgrade this generator by" and "doing &eShift + Right Click" at event-block

# =========================================================================
# COMMAND: /deleteallgens - Purge all personal generators
# =========================================================================
command /deleteallgens []:
    trigger:
        if argument 1 is not "confirm":
            send " " to player
            send "&c&l⚠️ DANGER ZONE ⚠️" to player
            send "&7This action will delete all of your placed generators." to player
            send "&7You will &c&lNOT &7get your generator items back!" to player
            send "&fTo proceed anyway, type: &e/deleteallgens confirm" to player
            send " " to player
            stop

        if {placed_gens::%player's uuid%} is not set:
            set {placed_gens::%player's uuid%} to 0

        if {placed_gens::%player's uuid%} <= 0:
            send "&cYou do not have any active generators deployed right now." to player
            stop

        loop {gen_locations::%player's uuid%::*}:
            set {_loc} to loop-value
            set block at {_loc} to air

            set {_x} to floor(x-coordinate of {_loc}) + 0.5
            set {_y} to floor(y-coordinate of {_loc}) + 0.5
            set {_z} to floor(z-coordinate of {_loc}) + 0.5
            set {_sx} to "%{_x}%"
            set {_sy} to "%{_y}%"
            set {_sz} to "%{_z}%"
            replace all "," with "" in {_sx}
            replace all "," with "" in {_sy}
            replace all "," with "" in {_sz}
            execute console command "execute at %player% run kill @e[tag=gen_display,x=%{_sx}%,y=%{_sy}%,z=%{_sz}%,distance=..1.5]"

        delete {gen_locations::%player's uuid%::*}
        set {placed_gens::%player's uuid%} to 0
        send "&a&lPURGE COMPLETE &7» &fAll deployed generator units have been deleted successfully." to player

# =========================================================================
# GENERATOR TICK — Drop item every 10 seconds
# =========================================================================
every 10 seconds:
    loop all players:
        if {placed_gens::%loop-player's uuid%} is set:
            loop {gen_locations::%loop-player's uuid%::*}:
                if block at loop-value-2 is {@GenBlock}:
                    drop 1 iron nugget named "&8Coal Gen Drop" with lore "&7Right-click to claim!" and "&eValue: $1" at block 1 above loop-value-2 without velocity
                else:
                    remove loop-value-2 from {gen_locations::%loop-player's uuid%::*}

# =========================================================================
# RIGHT-CLICK TO CLAIM DROP
# =========================================================================
on right click holding iron nugget:
    if name of player's tool is "&8Coal Gen Drop":
        cancel event
        set {_amt} to amount of player's tool
        remove {_amt} of player's tool from player's inventory

        set {_earnings} to {_amt} * {@ItemPrice}
        add {_earnings} to {balance::%player's uuid%}

        set {_bal_fmt} to floor({balance::%player's uuid%} * 100) / 100
        send action bar "&a+$%{_earnings}% &7from claiming drops! &8| &7Balance: &a$%{_bal_fmt}%" to player

# =========================================================================
# COMMAND: /sellall - Sell all coal gen drops at once
# =========================================================================
command /sellall:
    trigger:
        set {_count} to amount of iron nugget named "&8Coal Gen Drop" in player's inventory

        if {_count} > 0:
            remove {_count} of iron nugget named "&8Coal Gen Drop" from player's inventory
            set {_earnings} to {_count} * {@ItemPrice}
            add {_earnings} to {balance::%player's uuid%}

            set {_bal_fmt} to floor({balance::%player's uuid%} * 100) / 100
            send "&a&lSELLALL &8» &aYou sold &e%{_count}% &aCoal Drops for &e$%{_earnings}%&a! Balance: &a$%{_bal_fmt}%" to player
        else:
            send "&c&lSELLALL &8» &cYou do not have any coal generator drops in your inventory!" to player

# =========================================================================
# COMMAND: /balance - Check your balance
# =========================================================================
command /balance:
    aliases: /bal, /money
    trigger:
        set {_bal_fmt} to floor({balance::%player's uuid%} * 100) / 100
        send "&6&lBALANCE &8» &7Your current balance: &a$%{_bal_fmt}%" to player

# =========================================================================
# KILL TRACKER
# =========================================================================
on death of player:
    if attacker is a player:
        if {kills::%attacker's uuid%} is not set:
            set {kills::%attacker's uuid%} to 0
        add 1 to {kills::%attacker's uuid%}

# =========================================================================
# ADMIN COMMANDS
# =========================================================================
command /setmoney [] []:
    permission: admin.money
    permission message: &cYou do not have permission to execute this administrative action.
    trigger:
        if argument 1 is not set:
            send "&cSyntax Error! Usage: /setmoney  " to player
            stop
        if argument 2 is not set:
            send "&cSyntax Error! Usage: /setmoney  " to player
            stop

        set {balance::%arg-1's uuid%} to arg-2
        send "&aSuccessfully set &e%arg-1%'s &abalance to &e$%arg-2%&a." to player
        send "&aYour balance has been set to &e$%arg-2% &aby an operator." to arg-1

command /addgems [] []:
    permission: admin.gems
    permission message: &cYou do not have permission to execute this administrative action.
    trigger:
        if argument 1 is not set:
            send "&cSyntax Error! Usage: /addgems  " to player
            stop
        if argument 2 is not set:
            send "&cSyntax Error! Usage: /addgems  " to player
            stop

        add arg-2 to {gems::%arg-1's uuid%}
        send "&aSuccessfully gave &b%arg-2% Gems &ato &e%arg-1%&a." to player
        send "&aYou received &b%arg-2% Gems &afrom an operator." to arg-1

# =========================================================================
# ON JOIN — Initialize all player data
# =========================================================================
on join:
    if {balance::%player's uuid%} is not set:
        set {balance::%player's uuid%} to 0
    if {placed_gens::%player's uuid%} is not set:
        set {placed_gens::%player's uuid%} to 0
    if {kills::%player's uuid%} is not set:
        set {kills::%player's uuid%} to 0
    if {level::%player's uuid%} is not set:
        set {level::%player's uuid%} to 1
    if {xp::%player's uuid%} is not set:
        set {xp::%player's uuid%} to 0
    if {gems::%player's uuid%} is not set:
        set {gems::%player's uuid%} to 0
    if {credits::%player's uuid%} is not set:
        set {credits::%player's uuid%} to 0
Kodari AI
KodariJun 19 at 7:12 am 17

Looking at your screenshots, there are three clear issues to fix:

  1. Two separate on join events — Skript fires both but order isn’t guaranteed; data may not exist when the board builds

  2. Board never re-assigned to player — You create it once, then only modify {_b}, but if the board check fails the player never sees it. Safer to always create fresh and assign at the end

  3. Balance string formatting — "%floor({_bal} * 100) / 100%" can produce commas in large numbers that break the display

What was fixed:

#
Issue
Fix
1
Two separate on join events
Merged into one — data inits first, board builds after
wait 5 ticks
2
Board never assigned back to player
updateBoard
now always does
new board
→ sets lines →
set board of {_p} to {_b}
, eliminating the null-board edge case
3
Balance comma formatting
Added
replace all "," with ""
after every balance format, so
1,500.0
renders as
1500.0
4
text_display transformation
Added full transformation NBT (
left_rotation
,
right_rotation
,
translation
,
scale
) +
billboard:"center"
— required in 1.20.2+ for the entity to render at all

Place in plugins/Skript/scripts/genust.sk then run /sk reload genust.

Kodari can make mistakes. Review important code before using.
Files
genust.sk
Code
1 337
genust.sk
# =========================================================================
# GENUST - GEN RAID SERVER CORE SCRIPT
# Requires: Skript, SkBee, SkParticle
# =========================================================================

options:
    GenBlock: gray stained glass
    MaxGens: 5
    ItemPrice: 1
    StoreTag: &astore.jozmc.net

# =========================================================================
# SCOREBOARD SYSTEM (SkBee Boards)
# =========================================================================

function getMonthName(m: integer) :: text:
    if {_m} = 1:
        return "Jan"
    if {_m} = 2:
        return "Feb"
    if {_m} = 3:
        return "Mar"
    if {_m} = 4:
        return "Apr"
    if {_m} = 5:
        return "May"
    if {_m} = 6:
        return "Jun"
    if {_m} = 7:
        return "Jul"
    if {_m} = 8:
        return "Aug"
    if {_m} = 9:
        return "Sep"
    if {_m} = 10:
        return "Oct"
    if {_m} = 11:
        return "Nov"
    return "Dec"

function updateBoard(p: player):
    set {_uuid} to uuid of {_p}

    set {_level} to {level::%{_uuid}%}
    if {_level} is not set:
        set {_level} to 1
    set {_xp} to {xp::%{_uuid}%}
    if {_xp} is not set:
        set {_xp} to 0
    set {_bal} to {balance::%{_uuid}%}
    if {_bal} is not set:
        set {_bal} to 0
    set {_gems} to {gems::%{_uuid}%}
    if {_gems} is not set:
        set {_gems} to 0
    set {_credits} to {credits::%{_uuid}%}
    if {_credits} is not set:
        set {_credits} to 0
    set {_kills} to {kills::%{_uuid}%}
    if {_kills} is not set:
        set {_kills} to 0
    set {_gens} to {placed_gens::%{_uuid}%}
    if {_gens} is not set:
        set {_gens} to 0

    # XP percent toward next level (100 XP per level)
    set {_xp_needed} to {_level} * 100
    set {_xp_pct} to floor({_xp} * 100 / {_xp_needed})

    # Balance formatted to 2dp — strip any locale commas
    set {_bal_raw} to "%floor({_bal} * 100) / 100%"
    replace all "," with "" in {_bal_raw}

    # Date string
    set {_month_name} to getMonthName(month of now)
    set {_date} to "&8⏰ &7%{_month_name}% %day of now%, %year of now%"

    # Always build a fresh board and assign — avoids null-board edge cases
    set {_b} to new board with title "&6&lGENUST"

    set line 15 of {_b} to {_date}
    set line 14 of {_b} to " "
    set line 13 of {_b} to "&7Level: &e%{_level}%&6★ &7(%{_xp_pct}%%)"
    set line 12 of {_b} to "  "
    set line 11 of {_b} to "&7Balance: &a$%{_bal_raw}%"
    set line 10 of {_b} to "&7Gems: &b✧%{_gems}%"
    set line 9 of {_b} to "   "
    set line 8 of {_b} to "&7Credits: &6🪙%{_credits}%"
    set line 7 of {_b} to "    "
    set line 6 of {_b} to "&7Kills: &f%{_kills}%"
    set line 5 of {_b} to "&7Generators: &f%{_gens}%/{@MaxGens}"
    set line 4 of {_b} to "     "
    set line 3 of {_b} to "{@StoreTag}"

    set board of {_p} to {_b}

every 2 seconds:
    loop all players:
        updateBoard(loop-player)

# =========================================================================
# ON JOIN — Init all data then show board
# =========================================================================
on join:
    if {balance::%player's uuid%} is not set:
        set {balance::%player's uuid%} to 0
    if {placed_gens::%player's uuid%} is not set:
        set {placed_gens::%player's uuid%} to 0
    if {kills::%player's uuid%} is not set:
        set {kills::%player's uuid%} to 0
    if {level::%player's uuid%} is not set:
        set {level::%player's uuid%} to 1
    if {xp::%player's uuid%} is not set:
        set {xp::%player's uuid%} to 0
    if {gems::%player's uuid%} is not set:
        set {gems::%player's uuid%} to 0
    if {credits::%player's uuid%} is not set:
        set {credits::%player's uuid%} to 0
    wait 5 ticks
    updateBoard(player)

# =========================================================================
# COMMAND: /givegen
# =========================================================================
command /givegen [<player>]:
    permission: admin.gens
    permission message: &cYou do not have permission to execute this administrative action.
    trigger:
        if argument 1 is not set:
            send "&cSyntax Error! Usage: /givegen <player>" to player
            stop

        give arg-1 1 {@GenBlock} named "&fCoal Generator Tier 1" with lore " " and "&7Generates banknotes worth" and "&a$1 &7every 10 seconds." and " " and "&7Upgrade this generator by" and "doing &eShift + Right Click"
        send "&aSuccessfully gave 1x &fCoal Generator Tier 1 &ato &e%arg-1%&a." to player
        send "&aYou received 1x &fCoal Generator Tier 1&a!" to arg-1

# =========================================================================
# GENERATOR PLACEMENT
# =========================================================================
on place of {@GenBlock}:
    if name of player's tool is "&fCoal Generator Tier 1":
        if {placed_gens::%player's uuid%} is not set:
            set {placed_gens::%player's uuid%} to 0

        if {placed_gens::%player's uuid%} >= {@MaxGens}:
            cancel event
            send "&cLimit Exceeded! You can only place a maximum of {@MaxGens} Generators." to player
            stop

        add 1 to {placed_gens::%player's uuid%}
        set {_loc} to location of event-block
        add {_loc} to {gen_locations::%player's uuid%::*}

        set {_x} to "%floor(x-coordinate of {_loc}) + 0.5%"
        set {_z} to "%floor(z-coordinate of {_loc}) + 0.5%"
        set {_as_y} to "%floor(y-coordinate of {_loc}) - 0.45%"
        set {_text_y} to "%floor(y-coordinate of {_loc}) + 1.35%"

        replace all "," with "" in {_x}
        replace all "," with "" in {_as_y}
        replace all "," with "" in {_text_y}
        replace all "," with "" in {_z}

        # Invisible small armor stand with coal ore on head
        execute console command "execute at %player% run summon armor_stand %{_x}% %{_as_y}% %{_z}% {Tags:[""gen_display""],Invisible:1b,Small:1b,Marker:1b,NoGravity:1b,ArmorItems:[{},{},{},{id:""minecraft:coal_ore"",count:1}]}"

        # Floating $1 text display — full transformation required for 1.20.2+
        execute console command "execute at %player% run summon text_display %{_x}% %{_text_y}% %{_z}% {Tags:[""gen_display""],text:'{""text"":""§a§l$1""}',background:0,billboard:""center"",transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[1.2f,1.2f,1.2f]}}"

        send "&aGenerator Placed! &7(%{placed_gens::%player's uuid%}%/{@MaxGens})" to player
    else:
        stop

# =========================================================================
# GENERATOR BREAKING
# =========================================================================
on break of {@GenBlock}:
    if {gen_locations::%player's uuid%::*} contains location of event-block:
        remove location of event-block from {gen_locations::%player's uuid%::*}
        subtract 1 from {placed_gens::%player's uuid%}

        set {_loc} to location of event-block
        set {_x} to floor(x-coordinate of {_loc}) + 0.5
        set {_y} to floor(y-coordinate of {_loc}) + 0.5
        set {_z} to floor(z-coordinate of {_loc}) + 0.5
        set {_sx} to "%{_x}%"
        set {_sy} to "%{_y}%"
        set {_sz} to "%{_z}%"
        replace all "," with "" in {_sx}
        replace all "," with "" in {_sy}
        replace all "," with "" in {_sz}

        execute console command "execute at %player% run kill @e[tag=gen_display,x=%{_sx}%,y=%{_sy}%,z=%{_sz}%,distance=..1.5]"

        send "&cGenerator Destroyed! &7(%{placed_gens::%player's uuid%}%/{@MaxGens})" to player

        cancel event
        set event-block to air
        drop 1 {@GenBlock} named "&fCoal Generator Tier 1" with lore " " and "&7Generates banknotes worth" and "&a$1 &7every 10 seconds." and " " and "&7Upgrade this generator by" and "doing &eShift + Right Click" at event-block