Solved Levels SMP Weapons [Season 2]

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

Yushaa

Active Member
Oct 19, 2023
64
2
8
26
Level SMPS Weapons/,
Can someone remake the levels smp weapons?

Description of all the weapons if you dont know what they are

Experience Banisher:
A netherstar and when held in someone's inventory and that person kills another player it bans that player permanently

Level Stealer:
a Diamond/Netherite sword and upon hitting another player it steals 1-5 levels from them. This ability should have a 120 second cooldown.



Levels Crown:
a Golden helmet that when worn it makes the players eaten golden apples give them regeneration 3 for 3 seconds [30 second cooldown]

also a deeper explanation for the levels crown if you dont get it, when a player is wearing the crown and they eat a golden apple it gives them regeneration 3 for 3 seconds with a 30 second cooldown

If you do this your a goat, thanks :emoji_slight_smile:

lunetivfx on discord if u needa dm me for smth!

Watch Flamefrag's most recent video for more info!
 
requires skbee, I haven't tested so tell me if you want anything changed or if something doesn't work

AppleScript:
command /givelevelsitems <player> <string>:
    permission: *
    trigger:
        arg-1 is set
        arg-2 is set
        if arg-2 is "xpbanisher":
            set {_i} to unbreakable nether star named "&4Experience Banisher"
            set {_n} to nbt compound of {_i}
            set string tag "lvlType" of {_n} to "xpbanisher"
            give arg-1 {_i}
            stop
        else if arg-2 is "lvlstealer":
            set {_i} to unbreakable diamond sword named "&bLevel Stealer"
            set {_n} to nbt compound of {_i}
            set string tag "lvlType" of {_n} to "lvlstealer"
            give arg-1 {_i}
            stop
        else if arg-2 is "crown":
            set {_i} to unbreakable golden helmet named "&eLevels Crown"
            set {_n} to nbt compound of {_i}
            set string tag "lvlType" of {_n} to "crown"
            give arg-1 {_i}
            stop
        else:
            send "&7avaliable items: xpbanisher, lvlstealer, crown" to player


on tab complete of "/givelevelsitems":
    set tab completions for position 1 to all players
    set tab completions for position 2 to "xpbanisher", "lvlstealer" and "crown"

on death of a player:
    victim is a player
    attacker is a player
    loop items in attacker's inventory:
        if string tag "lvlType" of nbt compound of loop-item is "xpbanisher":
            set {_c} to true
    {_c} is true
    ban victim due to "&7You got killed by %attacker's name% with the power of the &4Experience Banisher"
    kick victim because of "&7You got killed by %attacker's name% with the power of the &4Experience Banisher"
    send "&f%victim's name%&7's xp ran dry" to attacker

on damage of a player:
    victim is a player
    attacker is a player
    set {_n} to nbt compound of attacker's tool
    string tag "lvlType" of {_n} is "lvlstealer"
    set {_t} to metadata tag "stealerCooldown" of attacker
    if {_t} is set:
        if difference between {_t} and now is less than 120 seconds:
            stop
    set {_r} to ceiling(random number between 1 and 5)
    if victim's level is less than {_r}:
        set {_r} to the victim's level
    increase the attacker's level by {_r}
    reduce the victim's level by {_r}
    set metadata tag "stealerCooldown" of attacker to now
    draw 2 explosion at location of victim
    send "&7Your &bLevel Stealer &7stole you &f%ceiling({_r})% &7levels from %victim's name%" to attacker
    send "&7%attacker's name% stole &f%ceiling({_r})% &7levels from you using &bLevel Stealer" to victim

on consume of golden apple:
    player is a player
    set {_n} to nbt compound of player's helmet
    string tag "lvlType" of {_n} is "crown"
    difference between metadata value "appleCooldown" of player and now is less than 30 seconds
    apply regeneration 3 to the player for 3 seconds
    set metadata value "appleCooldown" of player to now
 
Last edited:
When i run the command to give myself it, it doesnt give me and just says ''available items: xpbanisher, lvlstealer and crown''
 
nvm I found a little error, reload the page and the script above should work
It works but i have a question, can you code a domain expansion item for me?
its fine if u say no


How it works:

Ender eye that if you hit someone with it, it teleports them to the designated area.
in more detail, What i want is that if you hit someone with an endereye it broadcasts ''%player% has pulled %player% into their domain'' and how i want this to work is that for example if me [Yushaa] hit someone with the endereye the person who got hit would be teleported to a specific area


shortened:

When you hit someone with the ender eye it teleports both players to a specific area
 
LOL maybe try to pay someone or someome may have made it in the future (if your still interested)
i coded it myself so its fine , back then i was terrible at skript but i learned now
also the levels skript only works on below 1.20.1