pet.sk

Created by Buffalimp

Other available versions. Ordered by newest to oldest versions:

Just so you know, we don't know the file format for every file. If it's just a bunch of random characters, it's probably a .zip or .jar.

#==============================================================================#
# Pets - Version 1.1                                   
# By: Buffalimp                                                                                                        
#                                                                                                                                                                        
# WARNING: Please do not edit anything unless you know what you are doing!                                    
# If you need help with this please contact me (Private message me) on Spigot or SkUnity.  
# If you like this script please leave a review, it means a lot to me. Thanks!                  
#==============================================================================#

options:
    VersionID: 1.1  # DONT CHANGE THIS!!

#===================================================#
# You may edit the messages under here! 
# but do not get rid of anything behind the colons: 
# only edit anything to the right of it/them.
# Before doing so, please read the above WARNING.
#===================================================#

    Prefix: &8[&bPets&8]
    NameCharacterLimit: 10
    TimeToRenamePet: 20 seconds
    GuiName: Pet Menu
    GuiNamePets: Select a pet
    OpenedTheGui: &7You opened the pet menu.
    ClosedTheGui: &7You closed the pet menu.
    NoPermission: &7You don't have permission to do this.
    NameIsTooLong: &7The name that you chose is too long.
    RenamedYourPet: &7Renamed your pet to %{_name}%&7.
    UpdateMessage: &bPets has been updated! &8https://www.spigotmc.org/resources/pets.66220/
    UpdateNotification: pet.staff
    PermissionToRenamePet: pet.rename
    PermissionForMiniMe: pet.minime
    PermissionForOwl: pet.owl
    PermissionForBird: pet.bird
    PermissionForBlaze: pet.blaze
    PermissionForTurtle: pet.turtle
    PermissionForLion: pet.lion
    UnsummonedYourPet: &7You have unsummoned your pet.
    YouDontHaveAPet: &7You currently don't have a pet selected.
    YouAlreadyHaveAPet: &7You already have a pet selected.
    TypeInChatToRenamePet: &7Type your pets new name in chat.
    TimeRanOutToRenameYourPet: &7Your time ran up to rename your pet.
    SummonedYourPet: &7You have summoned your pet.
    
#=================================================#
# Under here is all the script code! DO NOT touch.
# No support given if the code below was touched!
#=================================================#

command /pet [<text>]:
    aliases: pets
    trigger:
        set {_guihead} to "TurtleEdits" parsed as offlineplayer
        set {_guiinfo} to "MHF_Question" parsed as offlineplayer
        play "block_note_pling" to player
        play "ui_button_click" to player
        message "{@Prefix} {@OpenedTheGui}"
        open chest with 3 rows named "{@GuiName}" to player
        wait a tick
        set slot 0 and 1 and 2 and 3 and 4 and 5 and 6 and 7 and 8 and 9 and 11 and 17 and 18 and 19 and 20 and 21 and 22 and 23 and 24 and 25 and 26 of player's current inventory to gray glass named " " 
        set slot 10 of player's current inventory to skull of {_guiinfo} named "&b&lPets" with lore "&7Pick a pet, name a pet, and more!"			
        set slot 12 of player's current inventory to skull of {_guihead} named "&b&lChoose your pet" with lore "&7Click to choose a pet."
        set slot 13 of player's current inventory to name tag named "&a&lRename your pet" with lore "&7Click to rename your pet."
        set slot 14 of player's current inventory to barrier named "&c&lUnsummon your pet" with lore "&7Click to unsummon your pet."
        set slot 16 of player's current inventory to nether star named "&cClose" with lore "&7Click to close the menu."
        
on chat:
    if {rename.%player%} is set:
        cancel event
        set {_name} to "%colored message%"
        if player has the permissions "{@PermissionToRenamePet}":
            if length of "%{_name}%" is not more than {@NameCharacterLimit}:
                if {owl.%player%} is set:
                    loop {pets.%player%::*}:
                        kill loop-value
                        wait 1 tick
                        delete {pets.%player%::*}
                        delete {_pet.%player%}
                        spawn an armor stand at location behind the player
                        set {_pet.%player%} to last spawned armor stand
                        add "{CustomNameVisible:1,NoGravity:1b,Small:1,Invisible:1,Invulnerable:1,NoBasePlate:1,DisabledSlots:2039583}" to nbt of {_pet.%player%}
                        add spawned entity to {pets.%player%::*} 
                        set name of last spawned armor stand to "%{_name}%"
                        set {_head} to "Barnyard_Owl" parsed as offlineplayer       
                        set helmet of last spawned armor stand to skull of {_head}
                        send "{@Prefix} {@RenamedYourPet}"
                        delete {rename.%player%}
                        while {_pet.%player%} is alive:
                            if distance between player and {_pet.%player%} is greater than 1:
                                teleport {_pet.%player%} behind the player
                            wait a tick
                if {bird.%player%} is set:
                    loop {pets.%player%::*}:
                        kill loop-value
                        wait 1 tick
                        delete {pets.%player%::*}
                        delete {_pet.%player%}
                        spawn an armor stand at location behind the player
                        set {_pet.%player%} to last spawned armor stand
                        add "{CustomNameVisible:1,NoGravity:1b,Small:1,Invisible:1,Invulnerable:1,NoBasePlate:1,DisabledSlots:2039583}" to nbt of {_pet.%player%}
                        add spawned entity to {pets.%player%::*} 
                        set name of last spawned armor stand to "%{_name}%"
                        set {_head} to "GamingBread" parsed as offlineplayer       
                        set helmet of last spawned armor stand to skull of {_head}
                        send "{@Prefix} {@RenamedYourPet}"
                        delete {rename.%player%}
                        while {_pet.%player%} is alive:
                            if distance between player and {_pet.%player%} is greater than 1:
                                teleport {_pet.%player%} behind the player
                            wait a tick
                if {minime.%player%} is set:
                    loop {pets.%player%::*}:
                        kill loop-value
                        wait 1 tick
                        delete {pets.%player%::*}
                        delete {_pet.%player%}
                        spawn an armor stand at location behind the player
                        set {_pet.%player%} to last spawned armor stand
                        add "{CustomNameVisible:1,NoGravity:1b,Small:1,Invisible:1,Invulnerable:1,NoBasePlate:1,DisabledSlots:2039583}" to nbt of {_pet.%player%}
                        add spawned entity to {pets.%player%::*} 
                        set name of last spawned armor stand to "%{_name}%"
                        set {_head} to "%player%" parsed as offlineplayer       
                        set helmet of last spawned armor stand to skull of {_head}
                        set chestplate of last spawned armor stand to diamond chestplate
                        set leggings of last spawned armor stand to diamond leggings
                        set boots of last spawned armor stand to diamond boots     
                        send "{@Prefix} {@RenamedYourPet}"
                        delete {rename.%player%}
                        while {_pet.%player%} is alive:
                            if distance between player and {_pet.%player%} is greater than 1:
                                teleport {_pet.%player%} behind the player
                            wait a tick
                if {blaze.%player%} is set:
                    loop {pets.%player%::*}:
                        kill loop-value
                        wait 1 tick
                        delete {pets.%player%::*}
                        delete {_pet.%player%}
                        spawn an armor stand at location behind the player
                        set {_pet.%player%} to last spawned armor stand
                        add "{CustomNameVisible:1,NoGravity:1b,Small:1,Invisible:1,Invulnerable:1,NoBasePlate:1,DisabledSlots:2039583}" to nbt of {_pet.%player%}
                        add spawned entity to {pets.%player%::*} 
                        set name of last spawned armor stand to "%{_name}%"
                        set {_head} to "MHF_Blaze" parsed as offlineplayer       
                        set helmet of last spawned armor stand to skull of {_head}
                        send "{@Prefix} {@RenamedYourPet}"
                        delete {rename.%player%}
                        while {_pet.%player%} is alive:
                            if distance between player and {_pet.%player%} is greater than 1:
                                teleport {_pet.%player%} behind the player
                            wait a tick
                if {turtle.%player%} is set:
                    loop {pets.%player%::*}:
                        kill loop-value
                        wait 1 tick
                        delete {pets.%player%::*}
                        delete {_pet.%player%}
                        spawn an armor stand at location behind the player
                        set {_pet.%player%} to last spawned armor stand
                        add "{CustomNameVisible:1,NoGravity:1b,Small:1,Invisible:1,Invulnerable:1,NoBasePlate:1,DisabledSlots:2039583}" to nbt of {_pet.%player%}
                        add spawned entity to {pets.%player%::*} 
                        set name of last spawned armor stand to "%{_name}%"
                        set {_head} to "TurtleEdits" parsed as offlineplayer       
                        set helmet of last spawned armor stand to skull of {_head}
                        send "{@Prefix} {@RenamedYourPet}"
                        delete {rename.%player%}
                        while {_pet.%player%} is alive:
                            if distance between player and {_pet.%player%} is greater than 1:
                                teleport {_pet.%player%} behind the player
                            wait a tick
                if {lion.%player%} is set:
                    loop {pets.%player%::*}:
                        kill loop-value
                        wait 1 tick
                        delete {pets.%player%::*}
                        delete {_pet.%player%}
                        spawn an armor stand at location behind the player
                        set {_pet.%player%} to last spawned armor stand
                        add "{CustomNameVisible:1,NoGravity:1b,Small:1,Invisible:1,Invulnerable:1,NoBasePlate:1,DisabledSlots:2039583}" to nbt of {_pet.%player%}
                        add spawned entity to {pets.%player%::*} 
                        set name of last spawned armor stand to "%{_name}%"
                        set {_head} to "Lion" parsed as offlineplayer       
                        set helmet of last spawned armor stand to skull of {_head}
                        send "{@Prefix} {@RenamedYourPet}"
                        delete {rename.%player%}
                        while {_pet.%player%} is alive:
                            if distance between player and {_pet.%player%} is greater than 1:
                                teleport {_pet.%player%} behind the player
                            wait a tick
            else:
                send "{@Prefix} {@NameIsTooLong}"
        else:
            send "{@Prefix} {@NoPermission}"
                    
on inventory click:
    if inventory name of player's current inventory is "{@GuiName}":
        if clicked slot is 12:
            cancel event
            set {_lion} to "Lion" parsed as offlineplayer
            set {_turtle} to "TurtleEdits" parsed as offlineplayer
            set {_minime} to "%player%" parsed as offlineplayer
            set {_goback} to "MHF_ArrowLeft" parsed as offlineplayer
            set {_owl} to "Barnyard_Owl" parsed as offlineplayer
            set {_bird} to "GamingBread" parsed as offlineplayer
            set {_blaze} to "MHF_Blaze" parsed as offlineplayer
            set {_guiinfo} to "MHF_Question" parsed as offlineplayer
            wait 1 tick
            open chest with 6 rows named "{@GuiNamePets}" to player
            wait a tick
            set slot 0 and 1 and 2 and 3 and 4 and 5 and 6 and 7 and 8 and 9 and 17 and 18 and 26 and 27 and 35 and 36 and 44 and 45 and 46 and 47 and 48 and 49 and 50 and 51 and 52 and 53 of player's current inventory to gray glass named " " 
            set slot 10 of player's current inventory to skull of {_minime} named "&b&lMini me" with lore "&7Click to choose this pet."
            set slot 11 of player's current inventory to skull of {_owl} named "&b&lOwl" with lore "&7Click to choose this pet."
            set slot 12 of player's current inventory to skull of {_bird} named "&b&lBird" with lore "&7Click to choose this pet."
            set slot 13 of player's current inventory to skull of {_blaze} named "&b&lBlaze" with lore "&7Click to choose this pet."
            set slot 14 of player's current inventory to skull of {_turtle} named "&b&lTurtle" with lore "&7Click to choose this pet."
            set slot 15 of player's current inventory to skull of {_lion} named "&b&lLion" with lore "&7Click to choose this pet."
            set slot 39 of player's current inventory to skull of {_goback} named "&e&lGo back" with lore "&7Click to go back to the pet menu."
            set slot 40 of player's current inventory to nether star named "&cClose" with lore "&7Click to close the menu."
            stop
        if click slot is 13:
            if {selected.%player%} is set:
                cancel event
                wait a tick
                close player's inventory
                send "{@Prefix} {@TypeInChatToRenamePet}"
                set {rename.%player%} to true 
                wait {@TimeToRenamePet}
                if {rename.%player%} is true:
                    delete {rename.%player%}
                    send "{@Prefix} {@TimeRanOutToRenameYourPet}"
            else:
                cancel event
                wait a tick
                close player's inventory
                send "{@Prefix} {@YouDontHaveAPet}"
        if clicked slot is 14:
            if {selected.%player%} is set:
                cancel event
                wait a tick
                close player's inventory
                loop {pets.%player%::*}:
                    kill loop-value
                    send "{@Prefix} {@UnsummonedYourPet}"
                    wait 2 seconds
                    delete {pets.%player%::*}
                    delete {_pet.%player%}
                    delete {selected.%player%}
                    delete {owl.%player%}
                    delete {bird.%player%}
                    delete {minime.%player%}
                    delete {blaze.%player%}
                    delete {turtle.%player%}
                    delete {lion.%player%}
            else:
                cancel event
                wait a tick
                close player's inventory
                send "{@Prefix} {@YouDontHaveAPet}"
        if clicked slot is 16:
            cancel event
            wait a tick
            close player's inventory
            send "{@Prefix} {@ClosedTheGui}"
        if click slot is 0 or 1 or 2 or 3 or 4 or 5 or 6 or 7 or 8 or 9 or 10 or 11 or 17 or 18 or 19 or 20 or 21 or 22 or 23 or 24 or 25 or 26:
            cancel event
    if inventory name of player's current inventory is "{@GuiNamePets}":
        if clicked slot is 10:
            if player has the permission "{@PermissionForMiniMe}":
                if {selected.%player%} is not set:
                    cancel event
                    wait a tick
                    close player's inventory
                    set {selected.%player%} to true
                    set {minime.%player%} to true
                    spawn an armor stand at location behind the player
                    set {_pet.%player%} to last spawned armor stand
                    add "{CustomNameVisible:1,NoGravity:1b,Small:1,Invisible:1,Invulnerable:1,NoBasePlate:1,DisabledSlots:2039583}" to nbt of {_pet.%player%}
                    add spawned entity to {pets.%player%::*} 
                    set name of last spawned armor stand to "&b&l%player%'s Pet"
                    set {_head} to "%player%" parsed as offlineplayer 
                    set chestplate of last spawned armor stand to diamond chestplate
                    set leggings of last spawned armor stand to diamond leggings
                    set boots of last spawned armor stand to diamond boots
                    set helmet of last spawned armor stand to skull of {_head}
                    send "{@Prefix} {@SummonedYourPet}"
                    while {_pet.%player%} is alive:
                        if distance between player and {_pet.%player%} is greater than 1:
                            teleport {_pet.%player%} behind the player
                            set {_item} to player's held item
                            set held item of {_pet.%player%} to {_item}
                        wait a tick
                else:
                    cancel event
                    wait a tick
                    close player's inventory
                    send "{@Prefix} {@YouAlreadyHaveAPet}"
            else:
                cancel event
                wait a tick
                close player's inventory
                send "{@Prefix} {@NoPermission}"
        if clicked slot is 11:
            if player has the permission "{@PermissionForOwl}":
                if {selected.%player%} is not set:
                    cancel event
                    wait a tick
                    close player's inventory
                    set {selected.%player%} to true
                    set {owl.%player%} to true
                    spawn an armor stand at location behind the player
                    set {_pet.%player%} to last spawned armor stand
                    add "{CustomNameVisible:1,NoGravity:1b,Small:1,Invisible:1,Invulnerable:1,NoBasePlate:1,DisabledSlots:2039583}" to nbt of {_pet.%player%}
                    add spawned entity to {pets.%player%::*} 
                    set name of last spawned armor stand to "&b&l%player%'s Pet"
                    set {_head} to "Barnyard_Owl" parsed as offlineplayer       
                    set helmet of last spawned armor stand to skull of {_head}
                    send "{@Prefix} {@SummonedYourPet}"
                    while {_pet.%player%} is alive:
                        if distance between player and {_pet.%player%} is greater than 1:
                            teleport {_pet.%player%} behind the player
                        wait a tick
                else:
                    cancel event
                    wait a tick
                    close player's inventory
                    send "{@Prefix} {@YouAlreadyHaveAPet}"
            else:
                cancel event
                wait a tick
                close player's inventory
                send "{@Prefix} {@NoPermission}"
        if clicked slot is 12:
            if player has the permission "{@PermissionForBird}":
                if {selected.%player%} is not set:
                    cancel event
                    wait a tick
                    close player's inventory
                    set {selected.%player%} to true
                    set {bird.%player%} to true
                    spawn an armor stand at location behind the player
                    set {_pet.%player%} to last spawned armor stand
                    add "{CustomNameVisible:1,NoGravity:1b,Small:1,Invisible:1,Invulnerable:1,NoBasePlate:1,DisabledSlots:2039583}" to nbt of {_pet.%player%}
                    add spawned entity to {pets.%player%::*} 
                    set name of last spawned armor stand to "&b&l%player%'s Pet"
                    set {_head} to "GamingBread" parsed as offlineplayer       
                    set helmet of last spawned armor stand to skull of {_head}
                    send "{@Prefix} {@SummonedYourPet}"
                    while {_pet.%player%} is alive:
                        if distance between player and {_pet.%player%} is greater than 1:
                            teleport {_pet.%player%} behind the player
                        wait a tick
                else:
                    cancel event
                    wait a tick
                    close player's inventory
                    send "{@Prefix} {@YouAlreadyHaveAPet}"
            else:
                cancel event
                wait a tick
                close player's inventory
                send "{@Prefix} {@NoPermission}"
        if clicked slot is 13:
            if player has the permission "{@PermissionForBlaze}":
                if {selected.%player%} is not set:
                    cancel event
                    wait a tick
                    close player's inventory
                    set {selected.%player%} to true
                    set {blaze.%player%} to true
                    spawn an armor stand at location behind the player
                    set {_pet.%player%} to last spawned armor stand
                    add "{CustomNameVisible:1,NoGravity:1b,Small:1,Invisible:1,Invulnerable:1,NoBasePlate:1,DisabledSlots:2039583}" to nbt of {_pet.%player%}
                    add spawned entity to {pets.%player%::*} 
                    set name of last spawned armor stand to "&b&l%player%'s Pet"
                    set {_head} to "MHF_Blaze" parsed as offlineplayer       
                    set helmet of last spawned armor stand to skull of {_head}
                    send "{@Prefix} {@SummonedYourPet}"
                    while {_pet.%player%} is alive:
                        if distance between player and {_pet.%player%} is greater than 1:
                            teleport {_pet.%player%} behind the player
                        wait a tick
                else:
                    cancel event
                    wait a tick
                    close player's inventory
                    send "{@Prefix} {@YouAlreadyHaveAPet}"
            else:
                cancel event
                wait a tick
                close player's inventory
                send "{@Prefix} {@NoPermission}"
        if clicked slot is 14:
            if player has the permission "{@PermissionForTurtle}":
                if {selected.%player%} is not set:
                    cancel event
                    wait a tick
                    close player's inventory
                    set {selected.%player%} to true
                    set {turtle.%player%} to true
                    spawn an armor stand at location behind the player
                    set {_pet.%player%} to last spawned armor stand
                    add "{CustomNameVisible:1,NoGravity:1b,Small:1,Invisible:1,Invulnerable:1,NoBasePlate:1,DisabledSlots:2039583}" to nbt of {_pet.%player%}
                    add spawned entity to {pets.%player%::*} 
                    set name of last spawned armor stand to "&b&l%player%'s Pet"
                    set {_head} to "TurtleEdits" parsed as offlineplayer       
                    set helmet of last spawned armor stand to skull of {_head}
                    send "{@Prefix} {@SummonedYourPet}"
                    while {_pet.%player%} is alive:
                        if distance between player and {_pet.%player%} is greater than 1:
                            teleport {_pet.%player%} behind the player
                        wait a tick
                else:
                    cancel event
                    wait a tick
                    close player's inventory
                    send "{@Prefix} {@YouAlreadyHaveAPet}"
            else:
                cancel event
                wait a tick
                close player's inventory
                send "{@Prefix} {@NoPermission}"
        if clicked slot is 15:
            if player has the permission "{@PermissionForLion}":
                if {selected.%player%} is not set:
                    cancel event
                    wait a tick
                    close player's inventory
                    set {selected.%player%} to true
                    set {lion.%player%} to true
                    spawn an armor stand at location behind the player
                    set {_pet.%player%} to last spawned armor stand
                    add "{CustomNameVisible:1,NoGravity:1b,Small:1,Invisible:1,Invulnerable:1,NoBasePlate:1,DisabledSlots:2039583}" to nbt of {_pet.%player%}
                    add spawned entity to {pets.%player%::*} 
                    set name of last spawned armor stand to "&b&l%player%'s Pet"
                    set {_head} to "Lion" parsed as offlineplayer       
                    set helmet of last spawned armor stand to skull of {_head}
                    send "{@Prefix} {@SummonedYourPet}"
                    while {_pet.%player%} is alive:
                        if distance between player and {_pet.%player%} is greater than 1:
                            teleport {_pet.%player%} behind the player
                        wait a tick
                else:
                    cancel event
                    wait a tick
                    close player's inventory
                    send "{@Prefix} {@YouAlreadyHaveAPet}"
            else:
                cancel event
                wait a tick
                close player's inventory
                send "{@Prefix} {@NoPermission}"
        if clicked slot is 40:
            cancel event
            wait a tick
            close player's inventory
            send "{@Prefix} {@ClosedTheGui}"
        if clicked slot is 0 or 1 or 2 or 3 or 4 or 5 or 6 or 7 or 8 or 9 or 17 or 18 or 26 or 27 or 35 or 36 or 44 or 45 or 46 or 47 or 48 or 49 or 50 or 51 or 52 or 53:            
            cancel event
        if clicked slot is 39:
            cancel event
            wait 1 tick
            set {_guihead} to "TurtleEdits" parsed as offlineplayer
            set {_guiinfo} to "MHF_Question" parsed as offlineplayer
            open chest with 3 rows named "{@GuiName}" to player
            wait a tick
            set slot 0 and 1 and 2 and 3 and 4 and 5 and 6 and 7 and 8 and 9 and 11 and 17 and 18 and 19 and 20 and 21 and 22 and 23 and 24 and 25 and 26 of player's current inventory to gray glass named " " 
            set slot 10 of player's current inventory to skull of {_guiinfo} named "&b&lPets" with lore "&7Pick a pet, name a pet, and more!"			
            set slot 12 of player's current inventory to skull of {_guihead} named "&b&lChoose your pet" with lore "&7Click to choose a pet."
            set slot 13 of player's current inventory to name tag named "&a&lRename your pet" with lore "&7Click to rename your pet."
            set slot 14 of player's current inventory to barrier named "&c&lUnsummon your pet" with lore "&7Click to unsummon your pet."
            set slot 16 of player's current inventory to nether star named "&cClose" with lore "&7Click to close the menu."
            

on quit:
    loop {pets.%player%::*}:
        kill loop-value
        delete {pets.%player%::*}
        delete {_pet.%player%}
        delete {selected.%player%}
        delete {owl.%player%}
        delete {bird.%player%}
        delete {minime.%player%}
        delete {blaze.%player%}
        delete {turtle.%player%}
        delete {lion.%player%}
        
on join:
	wait 3 ticks
	if player has the permission "{@UpdateNotification}":
		if text from "https://pastebin.com/raw/Mnpzirz4" is not "{@VersionID}":
			play "block_note_pling" to player
			send "{@Prefix} {@UpdateMessage}"
			stop
			
#=======================================#
# Terms: Do not edit this skript/script 
# and give/sell it as if it were your own!
#=======================================#