Can anyone tell me why this doesn't work?

  • 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!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

MynaMC

Member
Aug 15, 2022
3
0
1
54
Code:
#If you obtain this code, please do not use it for your own server.
#If you wish too, you must forst ask "Hi I'm Myna#1234" on Discord for permission and you must give credit.

if event-world is "randomffa":
    teleport player to location(6.5, 79, -2.5,world("randomffa"))
    set {sword.%player%} to random number between 1 and 5
    set {helmet.%player%} to random number between 1 and 5
    set {chest.%player%} to random number between 1 and 5
    set {legs.%player%} to random number between 1 and 5
    set {boots.%player%} to random number between 1 and 5
    set {block.%player%} to stone
#if a player is on RandomFFA, this will give them thier loadout

    if {sword.%player%} is 1:
        set slot 0 of player to wooden sword named "&4Wodden Sword" to be unstealable and unbreakable
    if {sword.%player%} is 2:
        set slot 0 of player to stone sword named "&8Stone Sword" to be unstealable and unbreakable
    if {sword.%player%} is 3:
        set slot 0 of player to gold sword named "&6Gold Sword" to be unstealable and unbreakable
    if {sword.%player%} is 4:
        set slot 0 of player to iron sword named "&7Iron Sword" to be unstealable and unbreakable
    if {sword.%player%} is 5:
        set slot 0 of player to diamond sword named "&bDiamond Sword" to be unstealable and unbreakable
#selects player's sword

    if {helmet.%player%} is 1:
        equip player with leather helmet named "&4Leather Helmet" to be unstealable and unbreakable
    if {helmet.%player%} is 2:
        equip player with chainmail helmet named "&8Chainmail Helmet" to be unstealable and unbreakable
    if {helmet.%player%} is 3:
        equip player with gold helmet named "&6Gold Helmet" to be unstealable and unbreakable
    if {helmet.%player%} is 4:
        equip player with iron helmet named "&7Iron Helmet" to be unstealable and unbreakable
    if {helmet.%player%} is 5:
        equip player with diamond helmet named "&bDiamond Helmet" to be unstealable and unbreakable
#selects player's hemlet

    if {chest.%player%} is 1:
        equip player with leather chestplate named "&4Leather Chestplate" to be unstealable and unbreakable
    if {chest.%player%} is 2:
        equip player with chainmail chestplate named "&8Chainmail Chesplate" to be unstealable and unbreakable
    if {chest.%player%} is 3:
        equip player with gold chestplate named "&6Gold Chestplate" to be unstealable and unbreakable
    if {chest.%player%} is 4:
        equip player with iron chestplate named "&7Iron Chestplate" to be unstealable and unbreakable
    if {chest.%player%} is 5:
        equip player with diamond chestplate named "&bDiamond Chestplate" to be unstealable and unbreakable
#selects player's chestplate

    if {legs.%player%} is 1:
        equip player with leather leggings named "&4Leather Leggings" to be unstealable and unbreakable
    if {legs.%player%} is 2:
        equip player with chainmail leggings named "&8Chainmail Leggings" to be unstealable and unbreakable
    if {legs.%player%} is 3:
        equip player with gold leggings named "&6Gold Leggings" to be unstealable and unbreakable
    if {legs.%player%} is 4:
        equip player with iron leggings named "&7Iron Leggings" to be unstealable and unbreakable
    if {legs.%player%} is 5:
        equip player with diamond leggings named "&bDiamond Leggings" to be unstealable and unbreakable
#selects player's leggings

    if {boots.%player%} is 1:
        equip player with leather boots named "&4Leather Boots" to be unstealable and unbreakable
    if {boots.%player%} is 2:
        equip player with chainmail boots named "&8Chainmail Boots" to be unstealable and unbreakable
    if {boots.%player%} is 3:
        equip player with gold boots named "&6Gold Boots" to be unstealable and unbreakable
    if {boots.%player%} is 4:
        equip player with iron boots named "&7Iron Boots" to be unstealable and unbreakable
    if {boots.%player%} is 5:
        equip player with diamond boots named "&bDiamond Boots" to be unstealable and unbreakable
#selects player's boots

on death:
    respawn player
    teleport player to location(6.5, 79, -2.5,world("randomffa"))
    set {sword.%player%} to random number between 1 and 5
    set {helmet.%player%} to random number between 1 and 5
    set {chest.%player%} to random number between 1 and 5
    set {legs.%player%} to random number between 1 and 5
    set {boots.%player%} to random number between 1 and 5
#resets gear and auto respawns player on death

command /blocks:
    trigger:
        wait 2 ticks
        open chest with 2 rows named "Block selection:" to player
        format slot 0 of player with stone named "&7Stone" with lore "&1Unlocked at 0 kills" to be unstealable
        if {kills.%player%} is above 1:
            format slot 1 of player with white wool named "&fWhite Wool" with lore "&1Unlocked at 1 kill" to be unstealable
        if {kills.%player%} is above 10:
            format slot 2 of player with red wool named "&cRed Wool" with lore "&1Unlocked at 10 kills" to be unstealable
            format slot 3 of player with blue wool named "&9Blue Wool" with lore "&1Unlocked at 10 kills" to be unstealable
        if {kills.%player%} is above 20:
            format slot 4 of player with yellow wool named "&eYellow Wool" with lore "&1Unlocked at 20 kills" to be unstealable
            format slot 5 of player with purple wool named "&5Purple Wool" with lore "&1Unlocked at 20 kills" to be unstealable
        if {kills.%player%} is above 30:
            format slot 6 of player with black wool named "&0Black Wool" with lore "&1Unlocked at 30 kills" to be unstealable
            format slot 7 of player with coal ore named "&8Coal Ore" with lore "&1Unlocked at 30 kills" to be unstealable
        if {kills.%player%} is above 50:
            format slot 8 of player with iron ore named "&7Iron Ore" with lore "&1Unlocked at 50 kills" to be unstealable
            format slot 9 of player with gold ore named "&6Gold Ore" with lore "&1Unlocked at 50 kills" to be unstealable
        if {kills.%player%} is above 100:
            format slot 10 of player with emerald ore named "&aEmeral Ore" with lore "&1Unlocked at 100 kills" to be unstealable
            format slot 11 of player with diamond ore named "&bDiamond Ore" with lore "&1Unlocked at 100 kills" to be unstealable
        if permission is allstaff:
            format slot 12 of player with orange wool named "&6Orange Wool" with lore "&1Unlocked by being staff" to be unstealable
        if permission is nte.owner:
            format slot 13 of player with lime wool named "&aLime Wool" with lore "&1Unlocked by being Owner" to be unstealable
        if permission is nte.iron:
            format slot 14 of player with iron block named "&7Iron Block" with lore "&1Unlocked by purchasing Iron Rank" to be unstealable
        if permission is nte.gold:
            format slot 15 of player with gold block named "&6Gold Block" with lore "&1Unlocked by purchasing Gold Rank" to be unstealable
        if permission is nte.dia:
            format slot 16 of player with diamond block named "&bDiamond Block" with lore "&1Unlocked by purchacing Diamond Rank" to be unstealable
        if permission is nte.em:
            format slot 17 of player with emerald block named "&aEmerald Block" with lore "&1Unlocked by purchasing Emeral Rank" to be unstealable
#Block selection GUI

on inventory click:
    if event-item is stone:
        set {block.%player%} to stone
    if event-item is white wool:
        set {block.%player%} to white wool
    if event-item is red wool:
        set {block.%player%} to red wool
    if event-item is blue wool:
        set {block.%player%} to blue wool
    if event-item is yellow wool:
        set {block.%player%} to yellow wool
    if event-item is purple wool:
        set {block.%player%} to purple wool
    if event-item is black wool:
        set {block.%player%} to black wool
    if event-item is coal ore:
        set {block.%player%} to coal ore
    if event-item is iron ore:
        set {block.%player%} to iron ore
    if event-item is gold ore:
        set {block.%player%} to gold ore
    if event-item is emerald ore:
        set {block.%player%} to emerald ore
    if event-item is diamond ore:
        set {block.%player%} to diamond ore
    if event-item is orange wool:
        set {block.%player%} to orange wool
    if event-item is lime wool:
        set {block.%player%} to lime wool
    if event-item is iron block:
        set {block.%player%} to iron block
    if event-item is gold block:
        set {block.%player%} to gold block
    if event-item is diamond block:
        set {block.%player%} to diamond block
    if event-item is emerald block:
        set {block.%player%} to emerald block
#if a player selects a block, it will change

on death:
    victim is a player
    damager is a player
    send "&eYou've killed &a%victim%&e!" to damager
    add 1 to {kill.%player%} for damager
#on killing a player, the killer will gain a kill

    if event-world is "randomffa":
        set {randomffa.%player%} to true
    else:
        set {randomffa.%player%} to false
#if player is on RandomFFA, the plugin will know

    if {randomffa.%player%} is true
        set line 5 of player's scoreboard to "&a&lMynaMC"
        set line 4 of player's scoreboard to "&fPlaying on: &cRandomFFA"
        set line 3 of player's scoreboard to "&f"
        set line 2 of player's scoreboard to "&fUse &3/discord"
        set line 1 of player's scoreboard to "&a&lMynaMC.mysrv.us"
#if player is in RandomFFA, "Playing On" section will change

    if {randomffa.%player%} is false:
        set line 5 of player's scoreboard to "&a&lMynaMC"
        set line 4 of player's scoreboard to "&fPlaying on: &cLobby"
        set line 3 of player's scoreboard to "&f"
        set line 2 of player's scoreboard to "&fUse &3/discord"
        set line 1 of player's scoreboard to "&a&lMynaMC.mysrv.us"
#if player is in the lobby, "Playing On" section will change
 
Status
Not open for further replies.