skPets.sk

Created by YoshYz

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.

#        _      ____           _         
#  ___  | | __ |  _ \    ___  | |_   ___ 
# / __| | |/ / | |_) |  / _ \ | __| / __|
# \__ \ |   <  |  __/  |  __/ | |_  \__ \
# |___/ |_|\_\ |_|      \___|  \__| |___/
#

#Author: YoshYz
#Version: 1.2.5d

#==========================================================================================================#
# -------------------------------------------------------------------------------------------------------- #
#                                            OPTIONS                                                       #
# -------------------------------------------------------------------------------------------------------- #
#==========================================================================================================#

options:
#Main Things:
    Prefix: &9▪ skPets&9>
    NoPermissions: &cYou don't have the permission to execute this command.
#Options:
    LoadingPanel: true #false
#Messages:
    newPet_created: &7You have created the &a[pet] &7pet.
    newPet_alreadyExist: &7The &a[pet] &7pet already exist.
    deletePet_deleted: &7You have deleted the &c[pet] &7pet.
    findPet_doesntExist: &7The &c[pet] &7pet doesn't exist in the database.
    spawnPet_spawned: &7Your pet is now spawned.
    myPet_withoutPet: &7You don't have a pet.
    myPet_notwithYou: &7Your pet isn't with you.
    callPet: &7Your pet has just reached you!
    despawnPet: &7Your pet is now despawned.
    hatPet_enable: &7Your pet jumped on you.
    hatPet_disable: &7Your pet dropped from you.
    myPet_hungry: &7Your pet is hungry , you need to feed him.
    wrong_sintax: &cWrong syntax of the command&8: &c/pets help
#Panels:
#> LoadingPanel:
    loadingPanel_title: &9Loading...
#> PetsShop:
    petsShop_title: &9skPets - Selector
    petsShop_petUnlocked: &8[&a[pet]&8]
    petsShop_petLocked: &8[&c[pet]&8]
#> PetsProfile:
    petsProfile_title: &9skPets - Profile
    
#==========================================================================================================#
# -------------------------------------------------------------------------------------------------------- #
#                                           FUNCTIONS                                                      #
# -------------------------------------------------------------------------------------------------------- #
#==========================================================================================================#

function loadingPanel(p: player):
    open virtual chest inventory with size 5 named "{@loadingPanel_title}" to {_p}
    loop 3 times:
        make a gui slot 23 of {_p} with Air named " " to do nothing
        make a gui slot 21 of {_p} with Light Green Stained Glass Pane named " " to do nothing
        wait 2 ticks
        make a gui slot 21 of {_p} with Air named " " to do nothing
        make a gui slot 22 of {_p} with Light Green Stained Glass Pane named " " to do nothing
        wait 2 ticks
        make a gui slot 22 of {_p} with Air named " " to do nothing
        make a gui slot 23 of {_p} with Light Green Stained Glass Pane named " " to do nothing
        wait 2 ticks
    make a gui slot 21 of {_p} with Air named " " to do nothing
    make a gui slot 22 of {_p} with Air named " " to do nothing
    make a gui slot 23 of {_p} with Air named " " to do nothing
	
function progressPet(player: player) :: text:
    set {_uuid} to "%uuid of {_player}%"
    set {_progress} to ""
    loop 8 times:
        if loop-value > ({skpets::players::%{_uuid}%::pet::exp} / {skpets::players::%{_uuid}%::pet::expneeded} * 8):
            set {_progress} to "%{_progress}%&8■"
        else:
            set {_progress} to "%{_progress}%■"
    set {_medium} to {skpets::players::%{_uuid}%::pet::expneeded}/2
    set {_low} to {skpets::players::%{_uuid}%::pet::expneeded}/3
    if {skpets::players::%{_uuid}%::pet::exp} >= {skpets::players::%{_uuid}%::pet::expneeded}:
        set {_progress} to "&2%{_progress}%"
    if {skpets::players::%{_uuid}%::pet::exp} >= {_medium}:
        if {skpets::players::%{_uuid}%::pet::exp} < {skpets::players::%{_uuid}%::pet::expneeded}:
            set {_progress} to "&a%{_progress}%"
    if {skpets::players::%{_uuid}%::pet::exp} <= {_medium}:
        if {skpets::players::%{_uuid}%::pet::exp} > {_low}:
            set {_progress} to "&6%{_progress}%"
    if {skpets::players::%{_uuid}%::pet::exp} <= {_low}:
        set {_progress} to "&c%{_progress}%"
    return {_progress}
	
function levelUpPet(player: player):
    set {_uuid} to "%uuid of {_player}%"
    if {skpets::players::%{_uuid}%::pet::exp} >= {skpets::players::%{_uuid}%::pet::expneeded}:
        add 1 to {skpets::players::%{_uuid}%::pet::level}
        remove {skpets::players::%{_uuid}%::pet::expneeded} from {skpets::players::%{_uuid}%::pet::exp}
        set {skpets::players::%{_uuid}%::pet::exp} to {skpets::players::%{_uuid}%::pet::exp}
        set {skpets::players::%{_uuid}%::pet::progress} to 0
        set {skpets::players::%{_uuid}%::pet::expneeded} to {skpets::players::%{_uuid}%::pet::expneeded}*2
	
function forcedespawnPet(player: player):
    set {_uuid} to "%uuid of {_player}%"
    if {skpets::players::%{_uuid}%::pet::type} is set:
        if {skpets::players::%{_uuid}%::pet::entity} is set: 
            teleport {skpets::players::%{_uuid}%::pet::entity} to location at 99999 , 200 , 99999 in world "world"
            kill {skpets::players::%{_uuid}%::pet::entity} 
            delete {skpets::players::%{_uuid}%::pet::entity}
            stop
			
function despawnALLPets():
    loop all entities:
        if loop-entity is a zombie:
            if "%nbt of loop-entity%" contains "Silent:1":
                teleport loop-entity to location at 99999 , 200 , 99999 in world "world"
                kill loop-entity
        if loop-entity is a player:
            delete {skpets::players::%uuid of loop-entity%::pet::entity}		
	
function despawnPet(player: player) :: boolean:
    set {_uuid} to "%uuid of {_player}%"
    if {skpets::players::%{_uuid}%::pet::type} is set:
        if {skpets::players::%{_uuid}%::pet::entity} is set: 
            teleport {skpets::players::%{_uuid}%::pet::entity} to location at 99999 , 200 , 99999 in world "world"
            kill {skpets::players::%{_uuid}%::pet::entity} 
            delete {skpets::players::%{_uuid}%::pet::entity}
            set {_status} to true
            return {_status}
            stop
    set {_status} to false
    return {_status}
	
function oorangePet(player: player):
    set {_uuid} to "%uuid of {_player}%"
    if {skpets::players::%{_uuid}%::pet::type} is set:
        if {skpets::players::%{_uuid}%::pet::entity} is set: 
            while {skpets::players::%{_uuid}%::pet::entity} is alive:
                if distance between {skpets::players::%{_uuid}%::pet::entity} and {_player} >= 15:
                    forcedespawnPet( {_player} )
                    message " {@Prefix} {@despawnPet}" to {_player}   
                    stop
                wait 5 seconds
                chance of 25%:
                    if {skpets::players::%{_uuid}%::pet::hunger} > 0:
                        remove 1 from {skpets::players::%{_uuid}%::pet::hunger}			
            stop				

function newPet(name: text , class: text , texture: integer) :: boolean:
    if {skpets::list::%{_name}%} is set:
        set {_status} to false
        return {_status}
        stop
    set {skpets::list::%{_name}%} to "%{_name}%"
    if {_class} is "Characters":
        if {_texture} is 1: #Toy Chica
            set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""d3610225-332c-4b5d-8ed2-2052553f1140"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvY2MzNzY2OGQ1ZWFlMThiYTc2NmNkNWM4ZWJjNzVjNDhkZTFiYTQ0Y2JlNDg5ZDgyOWE1ZWNhODY5MWJmNTU2In19fQ==""}]}}}"
        if {_texture} is 2: #Zoidberg
            set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""9e052b46-699a-40ed-9444-cb312ca2b1d3"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvODIzOGMxMTRiMjdjYTlmZmQ2ZTc3NTRmZWM1ODJjN2UzNjk5MjgyODNiMmQ3ZmNlMTQ5ZWFhMzEyYmQyIn19fQ==""}]}}}"
        if {_texture} is 3: #Toy Mangle
            set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""635ed117-c07c-467d-bba0-85533518712b"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNGUxMTU5ZTFhYWQyMzk1OTdkZWE5ODYyOWUwOTQ2NTQwMTVjNmRkYjljZWQyYzliMGYzYmMxMmQ5ZTYzYWY4In19fQ==""}]}}}"
        if {_texture} is 4: #Zelda
            set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""93930bc0-c1ae-4e1b-96ac-f77d8aabc564"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZmM5NmExNGRjMWNiOTQzYjhmZjNjOTJhYWNiMDEwMmMyMzg5ZWVkZWY1MGQzNmI3MTRkMGRiOThiMjdhIn19fQ==""}]}}}"
        if {_texture} is 5: #Toy Freddy Fazbear
            set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""ec845821-7123-465b-81a5-db71de766752"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZWQzZjNlMTE0YzYzMWNhZGM4YTU2MDYwMjFiNGI0ZjllMTVmYTZlYzg5ZDNlZWViMWNlYzgyNWNmMjliODgzIn19fQ==""}]}}}"
        if {_texture} is 6: #Toy Bonnie
            set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""eea1e571-b002-4593-9121-cb768ea218dc"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMmYzZmFjYTNkMTNlNmVjMzczZDdhMjhkYWI4OTU5ZmMyYjdjY2NlNWZiNjE3YjFjNTYzYWFkYmIwMzkzMiJ9fX0=""}]}}}"
        if {_texture} is 7: #Toy Chica
            set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""004db60f-fd03-4d61-9a52-d32b70f9616e"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMTdhMWQ0MmVmNzExODc1NzcyOTFkNmFlOTNhNGJlYjhiMTYxYTQzYmMyNjU2MjIwMWNhMjUxNTJiNmZmMzg3In19fQ==""}]}}}"
        if {_texture} is 8: #Toy Foxy
            set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""f3b96da6-c931-4977-922d-e6c727677a29"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYjI4MTJhYWE5NTQ3NzNmMmFkYTVhMmY3N2UzMmJhMmY3ZDhkMWY1ZDFiYjRhMzBmODYyNzk2NDJkM2Q4YmI4In19fQ==""}]}}}"
        if {_texture} is 9: #Marionette
            set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""7cb7a096-bf93-4ff3-98e4-de745a105d89"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvN2VjYWU4ZmRkOTIzM2I4MmRjMmY3YTk0NDU0NTBiNGE1MmYxYzM4M2EyNDE3OTkxYzgyZWQ3MWJmNzk1YWMxIn19fQ==""}]}}}"
        if {_texture} is 10: #Mangle
            set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""fe03aab2-c7d8-4295-a1d3-4c1784c26acb"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYzczYWQxZWJlYjliNzUyNTcwOGE5MzNiZGFlMDg2NTk5YThkY2Q2NmQ4YjQxNDUzMWNlNjNiZjk5NTNiZDNlIn19fQ==""}]}}}"
        if {_texture} is 11: #Link
            set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""63b2a003-04da-450b-b07a-de6906f8f677"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZGFhMDU5NjZkYmIzOWY3ODBlN2VhNjNhMjk1NjBkOGViNDhlMGMyNDk3YTgxOGE4OTU2NGE1YTE0YTMzZWYifX19""}]}}}"
        if {_texture} is 12: #Stitch
            set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""b4a745d0-2580-44c8-ae14-28ab38881b2d"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMTZhOGNiZTliNWI2NTYzNDVhZTAzNGJlZmVhZDI2YjkzNjc3ZmViYzg4NzI1NDkwNDE2Y2U3YmFiYmQ1OWYzZCJ9fX0=""}]}}}"
        if {_texture} is 13: #Groot
            set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""83152cb1-7361-40c5-b5a8-90602d45e9fb"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMjNjNzFhODVlZWIzY2Q2NDQ5MTU5Njc1YWE4OTI3OGEyYTFkNTg3YjRkMGI3NjgxNzRmYzJlMTVjOWJlNGQifX19""}]}}}"
        if {_texture} is 14: #Star Lord
            set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""a6204c1f-63ba-40d8-84a2-7f26459c1bb6"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYjViODFlMTc0N2IzMDQwODAxMDY5NzY4YjdjZWU4NWEzMmZlMGVhNTc4ZDdhNDg4NzgzYzc3NzhlNzJkN2U3In19fQ==""}]}}}"
        if {_texture} is 15: #Boba Fett
            set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""4761b4f6-2e26-4719-a4c9-cff0cacdc6ab"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZmJmZWY1ZTA2NTMzOTc5ZDU3Y2FhNGZiY2UyNjBlYzFlNGYyNDE3NGFhNzcyZjYwZjA2OGEwZjlhYzYzZWUifX19""}]}}}"
        if {_texture} is 16: #Storm Trooper
            set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""d644b0db-341b-4770-b3ee-f4da1de779b2"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZTMyYzMzNmRhODRhN2JhNjEwYzg4MWFhOTk1Zjk2NjRmMTlkYzJjNDBiZDExNDQ5ZTIwYzZjM2EzZTc1MSJ9fX0=""}]}}}"
        if {_texture} is 17: #Clone Trooper
            set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""9cdd5622-1624-43c9-9969-bdc43a816d26"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNzdlMGQ3MmNmNDQxY2NlOTRjY2UzY2IzYmNjZWM2ZmVjNWY4YWMyZDc5YmM5NjNkOGI3NGQ1NGEyMDYyIn19fQ==""}]}}}"
        if {_texture} is 18: #R2D2
            set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""327722ba-304d-4cc3-a3d7-b037f3990d64"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvN2NlYmM5Nzc5OGMyZTM2MDU1MWNhYjNkZDVkYjZkNTM0OTdmZTYzMDQwOTQxYzlhYzQ5MWE1OWNiZjM4M2E3YSJ9fX0=""}]}}}"
        if {_texture} is 19: #BB-8
            set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""837e8ce1-1850-4087-a51e-72720b19d7d9"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYzg1Njk4MWNjZWM4YTQ5Mjg5OGUwY2I0ZDk0NDNkMjE0NTlkNWI2NWRmYThkYTQ2MmQxNzY5N2ExNzhmOGUifX19""}]}}}"
        if {_texture} is 20: #Darth Vader
            set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""8d0d9feb-8866-48d5-ab7f-28f4a8947925"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYzFjM2UxZjIyNGI0NDZjY2FjNmE2Y2MzY2Q5ODkxMDE5YTEyMmY5OTY5MWMzOTA3OTkyYTNhZjk5YTIxYjAifX19""}]}}}"
        if {_texture} is 21: #Patrick
            set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""c2ee5e5f-3b6e-41d5-b6ff-e41d6f66ff6c"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYjk3MWI5Mjc3MjljNmVhY2UxNjU5M2IzM2E5ODZkNjE5NDNkNjJmNjk2MWRlNmRiNTk5YTgxOGIyYWYzMiJ9fX0=""}]}}}"
        if {_texture} is 22: #Spongebob
            set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""95972406-9912-4081-bb31-81c1d6801d98"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNWU3MWVmMzlhZjRlMzNlYmNmNjlhNGJlNjM3OTU0M2M1MDE1YWFlYzc2YmFiNmZjM2Q4NjJhNzVkZmUzYzQ3In19fQ==""}]}}}"
        if {_texture} is 23: #Ice King
            set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""dd76d7df-eae7-4c01-af5b-cfeac1ec2230"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYzJjZWU2MmI5OWQ4MDRkZGRlZGNmZTdhNzFhMTBjMmQ3YzhjMTYxNmFhY2I5MWRiODJlNDdhMjJkZDMxNCJ9fX0=""}]}}}"
        if {_texture} is 24: #Jake
            set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""307838c8-48ed-4903-91f8-a75d6132a967"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNTNkMTg3N2JlOTVhOWVkYjg2ZGYyMjU2ZjIzOTU4MzI0YzJlYzE5ZWY5NDI3N2NlMmZiNWMzMzAxODQxZGMifX19""}]}}}"
        if {_texture} is 25: #Finn
            set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""c65d9bca-26f3-4e0a-885e-e2133bef2a3d"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYjUxZDU5NjZlYTQ3MmM0M2VmNTJhNWY2NTdmZjg1OTIwM2JlYTI4ZmU0YmVkY2U1YTFjZDc4OWIzYWM0YmEifX19""}]}}}"
        if {_texture} is 26: #Sonic
            set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""42aa23d7-a37c-450c-9869-4c8925638f53"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYzVmNWM5ZmY5NGMwZGQ1Y2JiMWUyNzFhODE3ZTZlOWM1NTJlMzkyOGIxNTk1MTlkZDIyNmVmYWJkZCJ9fX0=""}]}}}"
        if {_texture} is 27: #Metaknight
            set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""3ff82ea9-0aa0-41c6-aa2f-d93d1a62cfc0"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMTQ2NDQ5MzczNjgyMzgxYTY1Y2FlNjVhMjI1M2Q4YjM2YjI5Mzc3NjQxMmM1ZGY4ZGVhNGQ5NjQzOTNhZjdhIn19fQ==""}]}}}"
        if {_texture} is 28: #Ness
            set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""7ed3d846-29ec-4266-b505-ef92994a6048"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMTk1NzdhOWJkYTY0ZjcxNmExNjkyMjIyOTlhZGQ1NmZjNzQ2Y2ZkODU1NjBiMzk3MWQ5NzYyYTQ4MzY2In19fQ==""}]}}}"
        if {_texture} is 29: #Wario
            set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""297447ae-1a42-447c-9bfd-dc342e5c770b"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvY2E4YjNhMWFmMmQ4ZmMzNzcyOWY2ZjYzZmRiYTVkNWUyMDk3NThkZWQ0YjJmY2Y2YWRkNGI4NWJmNjdlZGQ3MiJ9fX0=""}]}}}"
        if {_texture} is 30: #Princess Peach
            set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""575cc9a3-a425-493a-bbd0-dcbf18f0e91f"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZmViOTMzMWFjZGYzY2I3NmJkM2E1NmRkZDU5YjhiMTM5OGE1NDk1MmY1MzQ1NTFkZjgxNDIyYWJiZTk0ZiJ9fX0=""}]}}}"
        if {_texture} is 31: #Fox McCloud
            set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""3eb4f734-528e-4518-a1db-4e838d691b2c"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNzFiZTI5NzUwZGRlYzgwOTk0YmRhNzk2NTNlMjFlZDcwZDViMmViNzkzZGE1MWQ1YTg3Yjg5YmY2N2RjYjk2In19fQ==""}]}}}"
        if {_texture} is 32: #Bowser
            set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""d9eebcd2-987b-429b-ad88-43d24f3af599"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZTg2MDYxMGVkMzA3ODVlNjIyOWU4MmUyODk3YjQyZmRhYmIxZGY2Mjk2ZDM3MzFmYWMyNzQ0ZTU2YTllYjkifX19""}]}}}"
        if {_texture} is 33: #Mario
            set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""98958836-4e85-4e5d-9c20-6ee46723f202"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNmY3ZWI3NWU1NTQyY2M0OTM3YWFhZDViYjg2NTczOTNlYWYwMjY1MDA2ZWFjMWRjOTY2OTFmMzJlMTY0MzcifX19""}]}}}"
        if {_texture} is 34: #Luigi
            set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""3731f0dd-5c62-4f55-b894-4a1d9357b3ae"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZmYxNTMzODcxZTQ5ZGRhYjhmMWNhODJlZGIxMTUzYTVlMmVkMzc2NGZkMWNlMDI5YmY4MjlmNGIzY2FhYzMifX19""}]}}}"
        if {_texture} is 35: #Yoshi
            set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""91318ba0-ec9d-4072-95a7-fca5d39bd2dc"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNjcxZWJjMTFiZGQxNTE0MTBkYTcwZDkzMTI1OWM0ZTk2OTUyOGU2ZjU4ODllOWM0YmIyZGQ3NjNiOWVhZmQifX19""}]}}}"
        if {_texture} is 36: #Ash Ketchum
            set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""dd4c0164-6dc0-498a-bd0e-57d49a16e407"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZGMyMzU4NmY1MWZjOThiNTU0NTBiYjlhMzdhMDY2Y2FhYzI3NjVjMWQ0NzFjYjg5MTA5NGE4ZWMwMzJiZWZiIn19fQ==""}]}}}"
        if {_texture} is 37: #Bender
            set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""d9b02764-88e5-4b54-8ebd-080e1b09118d"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNmUyM2Q2MDdlOTJlNzI5YWY5NjY0YmZhMjZiZTk1OGI0YjJmOWYzZTAxMmVlZDgzM2Y5YTM1ZWE0YzRiMCJ9fX0=""}]}}}"
        if {_texture} is 38: #Batman
            set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""af20c020-6810-4abe-8437-97d3bff52bec"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZjI1NmY3MTczNWVmNDU4NTgxYzlkYWNmMzk0MTg1ZWVkOWIzM2NiNmVjNWNkNTk0YTU3MTUzYThiNTY2NTYwIn19fQ==""}]}}}"
        if {_texture} is 39: #Joker
            set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""c1e3bb5f-23bd-48b3-827a-b95d4f687d38"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYWY0ZjY4MjVlZjZkNWU0NmQ3OTQ2OTdkMWJmODZkMTQ0YmY2ZmIzZGE0ZTU1ZjdjZjU1MjcxZjYzN2VhYTcifX19""}]}}}"
        if {_texture} is 40: #Captain America
            set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""acabdba2-25db-4c35-8ab6-dbc5a5efa080"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvN2VjNTI3NzEzZDM0YzExNjdlZWQwY2QxZTk2OWRiZmFkNWQ0NGE3NTIxNTRjY2FmNjRjMWM3YWI2YmMzZjNmIn19fQ==""}]}}}"
        if {_texture} is 41: #Dead Pool
            set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""64fd8f0f-ae62-4c4c-be25-a224f08756bf"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZGMxNWMzMTYzOWU5M2YyYmIyNzRjZjI5ZDI0NGE4YTI5MDZlODBhYjhiZDJjMDEyMWM3ZmQxZTI2MjRkNTMifX19""}]}}}"
        if {_texture} is 42: #Doge
            set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""11ca9402-ec89-4708-b4cb-57e72006a739"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYjlhZmIyZTVmMGI5NzdjNGM2ODNlMDE3ZDJiNDdmY2QxNDg4YWI1NjM5Nzc2NmU1YjM4MDQwNWExMzkyNjAifX19""}]}}}"
        if {_texture} is 43: #Goomba
            set {skpets::pets::%{_name}%::texture} to "{display:{Name:""%{_name}%""},SkullOwner:{Id:""ba96c92d-1b08-4fd1-b0e5-39aab40215b7"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYWVjZjk0ZjRiY2JiZjZlYWRjYjI1YWEzZDA2OWFhNjc4ZWJkYjUyNDFlYjgyZThlMjY4ODljYWYzMjc1NTcwIn19fQ==""}]}}}"
    set {_status} to true
    return {_status}
		
function deletePet(name: text) :: boolean:
    if {skpets::list::%{_name}%} is set:
        set {_status} to true
        clear {skpets::list::%{_name}%}
        delete {skpets::list::%{_name}%}
        clear {skpets::pets::%{_name}%::*}
        loop all zombies:
            set {_nbt} to "%nbt of loop-entity%"
            if {_nbt} contains "%{_name}%":
                teleport loop-entity to location at 99999 , 200 , 99999 in world "world"
                kill loop-entity
                loop all players:
                    if {skpets::players::%uuid of loop-player%::pet::type} is "%{_name}%":
                        clear {skpets::players::%uuid of loop-player%::pet::*}
        return {_status}
        stop
    set {_status} to false
    return {_status}
		
function setPet(player: player , name: text) :: boolean:
    close {_player}'s inventory
    set {_uuid} to "%uuid of {_player}%"
    if {skpets::list::%{_name}%} is set:
        if {skpets::players::%{_uuid}%::pet::entity} is set:
            forcedespawnPet( {_player} )
        set {skpets::players::%{_uuid}%::pet::type} to "%{_name}%"
        set {skpets::players::%{_uuid}%::pet::hunger} to 100
        set {skpets::players::%{_uuid}%::pet::name} to "&a%{_player}%&b's pet &7LvL-&b1"
        set {skpets::players::%{_uuid}%::pet::level} to 1
        set {skpets::players::%{_uuid}%::pet::exp} to 0
        set {skpets::players::%{_uuid}%::pet::expneeded} to 25
        set {skpets::players::%{_uuid}%::pet::progress} to 0
        set {_status} to true
        return {_status}
        stop
    set {_status} to false
    return {_status}
	
function fixPet(player: player):
    set {_uuid} to "%uuid of {_player}%"
    set {skpets::players::%{_uuid}%::pet::entity}'s chestplate to iron chestplate
    set {skpets::players::%{_uuid}%::pet::entity}'s leggings to iron leggings
    set {skpets::players::%{_uuid}%::pet::entity}'s boots to iron boots
    set {skpets::players::%{_uuid}%::pet::entity}'s held item to iron sword
    wait 1 ticks
    set {skpets::players::%{_uuid}%::pet::entity}'s chestplate to air
    set {skpets::players::%{_uuid}%::pet::entity}'s leggings to air
    set {skpets::players::%{_uuid}%::pet::entity}'s boots to air
    set {skpets::players::%{_uuid}%::pet::entity}'s held item to air
		
function spawnPet(player: player) :: boolean:
    set {_uuid} to "%uuid of {_player}%"
    if {skpets::players::%{_uuid}%::pet::type} is set:
        if {skpets::players::%{_uuid}%::pet::entity} is set:
            forcedespawnPet( {_player} )
        spawn 1 zombie at location 99999 , 200 , 99999 in world "world"
        add "{CanPickUpLoot:0,Equipment:[{id:""air"",damage:0},{id:""air"",damage:0},{id:""air"",damage:0},{id:""air"",damage:0},{id:""air"",damage:0}],Silent:1,NoAI:0,ActiveEffects:[{Id:14,Amplifier:2,Duration:999999,ShowParticles:0b}],Attributes:[{Name:generic.attackDamage,Base:0},{Name:generic.followRange,Base:30},{Name:generic.movementSpeed,Base:0.4}]}" to nbt of last spawned zombie
        set the helmet of last spawned zombie to skull of player with nbt "%{skpets::pets::%{skpets::players::%{_uuid}%::pet::type}%::texture}%"
        set {_skpets::players::%{_uuid}%::pet::entity} to last spawned zombie
        set {skpets::players::%{_uuid}%::pet::entity} to {_skpets::players::%{_uuid}%::pet::entity}
        fixPet( {_player} )
        teleport {skpets::players::%{_uuid}%::pet::entity} to location of {_player}
        set {_status} to true
        return {_status}
        stop
    set {_status} to false
    return {_status}
	
function callPet(player: player) :: boolean:
    set {_uuid} to "%uuid of {_player}%"
    if {skpets::players::%{_uuid}%::pet::type} is set:
        forcedespawnPet( {_player} )
        spawnPet( {_player} )
        set {_status} to true
        return {_status}
        stop
    set {_status} to false
    return {_status}	
	
function ridePet(player: player) :: boolean:
    set {_uuid} to "%uuid of {_player}%"
    force {_player} dismount
    if {skpets::players::%{_uuid}%::pet::type} is set:
        if {skpets::players::%{_uuid}%::pet::entity} is set:
            if {skpets::players::%{_uuid}%::pet::hunger} > 20:
                close {_player}'s inventory
                teleport {skpets::players::%{_uuid}%::pet::entity} to location of {_player}
                make {_player} ride {skpets::players::%{_uuid}%::pet::entity}
                set {_status} to true
                loop integers from 2 to 6:
                    set {_slot::%loop-int%} to {_player}'s slot loop-int
                set slot 2 of {_player}'s inventory to skull of player with nbt "{display:{Name:""Oak Wood Arrow Left""},SkullOwner:{Id:""2391d533-ab09-434d-9980-adafde4057a3"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYmQ2OWUwNmU1ZGFkZmQ4NGU1ZjNkMWMyMTA2M2YyNTUzYjJmYTk0NWVlMWQ0ZDcxNTJmZGM1NDI1YmMxMmE5In19fQ==""}]}}}" named "&bLeft"
                set slot 3 of {_player}'s inventory to skull of player with nbt "{display:{Name:""Oak Wood Arrow Down""},SkullOwner:{Id:""5ca62fac-d094-4346-8361-e1dfdd970607"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNzQzNzM0NmQ4YmRhNzhkNTI1ZDE5ZjU0MGE5NWU0ZTc5ZGFlZGE3OTVjYmM1YTEzMjU2MjM2MzEyY2YifX19""}]}}}" named "&bBackwards"
                set slot 4 of {_player}'s inventory to skull of player with nbt "{display:{Name:""Oak Wood Dot""},SkullOwner:{Id:""b4f2fdc2-aa8e-44d7-ab8d-f409cae70b50"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNzQ1NjQ4NWFhMjM2MTQzNGNiM2JlNTMxYmMxMjE2NTlmNTU1YTRhYWYyNjFkMjFhMDZkN2FmZGU1YWE2MGIyIn19fQ==""}]}}}" named "&bJump"
                set slot 5 of {_player}'s inventory to skull of player with nbt "{display:{Name:""Oak Wood Arrow Up""},SkullOwner:{Id:""36ecf9de-9ce4-4ee3-a5af-c8beb82b9cc3"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMzA0MGZlODM2YTZjMmZiZDJjN2E5YzhlYzZiZTUxNzRmZGRmMWFjMjBmNTVlMzY2MTU2ZmE1ZjcxMmUxMCJ9fX0=""}]}}}" named "&bForwards"
                set slot 6 of {_player}'s inventory to skull of player with nbt "{display:{Name:""Oak Wood Arrow Right""},SkullOwner:{Id:""d513d666-0992-42c7-9aa6-e518a83e0b38"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMTliZjMyOTJlMTI2YTEwNWI1NGViYTcxM2FhMWIxNTJkNTQxYTFkODkzODgyOWM1NjM2NGQxNzhlZDIyYmYifX19""}]}}}" named "&bRight"
                while {_player}'s vehicle is set:
                    if name of {_player}'s held item is "&bJump":
                        push {_player}'s vehicle upwards at speed 0.4
                        wait 5 ticks
                        push {_player}'s vehicle forwards at speed 0.2
                        wait 2 ticks
                        push {_player}'s vehicle downwards at speed 0.4
                    if name of {_player}'s held item is "&bLeft":
                        push {_player}'s vehicle left at speed 0.4
                    if name of {_player}'s held item is "&bRight":
                        push {_player}'s vehicle right at speed 0.4
                    if name of {_player}'s held item is "&bForwards":
                        push {_player}'s vehicle forwards at speed 0.4
                    if name of {_player}'s held item is "&bBackwards":
                        push {_player}'s vehicle backwards at speed 0.4
                    wait 4 ticks
                loop integers from 2 to 6:
                    set slot loop-int of {_player}'s inventory to air
                    set slot loop-int of {_player}'s inventory to {_slot::%loop-int%}
            else:
                set {_status} to false
                return {_status}
                stop
        else:
            set {_status} to false
            return {_status}
            stop
    else:
        set {_status} to false
        return {_status}
        stop
		
function toggleHatPet(player: player) :: boolean:
    set {_uuid} to "%uuid of {_player}%"
    if {skpets::players::%{_uuid}%::pet::type} is set:
        if {skpets::players::%{_uuid}%::pet::entity} is set:
            if {skpets::players::%{_uuid}%::pet::hunger} > 20:
                close {_player}'s inventory
                if {skpets::players::%{_uuid}%::pet::entity} is riding {_player}:
                    make {skpets::players::%{_uuid}%::pet::entity} dismount
                    teleport {skpets::players::%{_uuid}%::pet::entity} to location of {_player}
                    message " {@Prefix} {@hatPet_disable}" to {_player}
                else:
                    teleport {skpets::players::%{_uuid}%::pet::entity} to location of {_player}
                    make {skpets::players::%{_uuid}%::pet::entity} ride {_player}
                    message " {@Prefix} {@hatPet_enable}" to {_player}
                set {_status} to true
                return {_status}
                stop
    set {_status} to false
    return {_status}
    stop
		
#==========================================================================================================#
# -------------------------------------------------------------------------------------------------------- #
#                                        GLOBAL DESPAWNING                                                 #
# -------------------------------------------------------------------------------------------------------- #
#==========================================================================================================#
		
on skript start:
    despawnALLPets()
	
on skript load:
    despawnALLPets()
	
on skript stop:
    despawnALLPets()
	
#==========================================================================================================#
# -------------------------------------------------------------------------------------------------------- #
#                                            COMMANDS                                                      #
# -------------------------------------------------------------------------------------------------------- #
#==========================================================================================================#

command /pets [<text>] [<text>] [<text>] [<integer>]:
    aliases: /pet, /skpet or /skpets
    trigger:
        if argument-1 isn't set:
            if {skpets::players::%uuid of player%::pet::type} is set:
                make player execute command "/pets profile"
                stop
            else:
                make player execute command "/pets shop"
                stop
        if argument-1 is "create":
            if player has permission "skpets.create":
                if argument-2 is set:
                    if argument-3 is "Characters":
                        if argument-4 is set:
                            set {_value} to "%arg-4%" parsed as integer
                            set {_status} to newPet( "%arg-2%" , "%arg-3%" , {_value} )
                            set {_message-1} to "{@newPet_created}"
                            set {_message-2} to "{@newPet_alreadyExist}"
                            replace all "[pet]" with "%arg-2%" in {_message-1}
                            replace all "[pet]" with "%arg-2%" in {_message-2}
                            if {_status} is true:
                                message " {@Prefix} %{_message-1}%"
                                stop
                            if {_status} is false:
                                message " {@Prefix} %{_message-2}%"
                                stop
                        else:
                            message "{@Prefix} {@wrong_sintax}"
                            stop
                    else:
                        message "{@Prefix} {@wrong_sintax}"
                        stop
                else:
                    message "{@Prefix} {@wrong_sintax}"
                    stop
            else:
                message "{@Prefix} {@NoPermissions}"
                stop
        if argument-1 is "delete":
            if player has permission "skpets.delete":
                if argument-2 is set:
                    set {_status} to deletePet( "%arg-2%" )
                    set {_message-1} to "{@deletePet_deleted}"
                    set {_message-2} to "{@findPet_doesntExist}"
                    replace all "[pet]" with "%arg-2%" in {_message-1}
                    replace all "[pet]" with "%arg-2%" in {_message-2}
                    if {_status} is true:
                        message " {@Prefix} %{_message-1}%"
                        stop
                    if {_status} is false:
                        message " {@Prefix} %{_message-2}%"
                        stop
                else:
                    message "{@Prefix} {@wrong_sintax}"
                    stop
            else:
                message "{@Prefix} {@NoPermissions}"
                stop
        if argument-1 is "set":
            if argument-2 is set:
                if player has permission "skpets.pets.%arg-2%":
                    set {_status} to setPet( player , "%arg-2%" )
                    set {_message-1} to "{@findPet_doesntExist}"
                    replace all "[pet]" with "%arg-2%" in {_message-1}
                    if {_status} is true:
                        set {_status} to spawnPet( player )
                        if {_status} is true:
                            set {_message-1} to "{@spawnPet_spawned}"
                            oorangePet(player)
                            message " {@Prefix} %{_message-1}%"
                        stop
                    if {_status} is false:
                        message " {@Prefix} %{_message-1}%"
                        stop
                else:
                    message "{@Prefix} {@NoPermissions}"
                    stop
            else:
                message "{@Prefix} {@wrong_sintax}"
                stop
        if argument-1 is "menu" or "profile":
            if player has permission "skpets.menu" or "skpets.profile":
                if {@LoadingPanel} is true:
                    loadingPanel( player ) 
                    wait 1 second
                open virtual chest inventory with size 6 named "{@petsProfile_title}" to the player	
                loop 54 times:
                    make a gui slot loop-number -1 of player with Gray Stained Glass Pane named " " to do nothing
                set {_progress} to progressPet( player )
                make a gui slot 22 of player with player's skull with nbt "%{skpets::pets::%{skpets::players::%uuid of player%::pet::type}%::texture}%" named "&8-[&aMy pet&8]-" with lore "|| &3Informations&8:|||| &9▪ &7Hunger&8: &8[&b%{skpets::players::%uuid of player%::pet::hunger}%&7/&3100&8]|| &9▪ &7Level&8: &e%{skpets::players::%uuid of player%::pet::level}%|| &9▪ &7Progress&8: &8[&b%{skpets::players::%uuid of player%::pet::exp}%&7/&3%{skpets::players::%uuid of player%::pet::expneeded}%&8]||||      %{_progress}%||&d" to do nothing
                make a gui slot 37 of player with Lead named "&aCall" with lore "|| &9» &7Rightclick to call your pet.||&d" to run player command "/pet call"
                make a gui slot 38 of player with player's skull with nbt "{display:{Name:""Blue Chalice""},SkullOwner:{Id:""df3308c5-b324-4eab-952e-309ef2008f92"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYzRlYWY5NmMzYzBiMWYwZTQ2OGFmM2RkOWEyODk2MzI3N2ZhNDQ4Njc2YjE0YzVlODk0NTA4NTNjZDUzIn19fQ==""}]}}}" named "&aDespawn" with lore "|| &9» &7Rightclick to despawn your pet.||&d" to run player command "/pet back"
                make a gui slot 42 of player with Saddle named "&aRide" with lore "|| &9» &7Rightclick to ride your pet.||&d" to run player command "/pet ride"
                make a gui slot 43 of player with player's skull with nbt "{display:{Name:""Top Hat""},SkullOwner:{Id:""819376bc-d037-4816-8fa4-a55b3bc36ef4"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYTIyYWY2N2M1YjFlMjUyZjgzYjM2NWIzOWE2YjU4OTVkMTU3NGRhYWIyZDU3NDg0MjIzY2Y0ZTE1OWM2N2UifX19""}]}}}" named "&aHat" with lore "|| &9» &7Rightclick to toggle your hat.||&d" to run player command "/pet hat"
        if argument-1 is "shop" or "selector":
            if player has permission "skpets.shop":
                if {@LoadingPanel} is true:
                    loadingPanel( player ) 
                    wait 1 second
                open virtual chest inventory with size 6 named "{@petsShop_title}" to the player	
                loop 54 times:
                    make a gui slot loop-number -1 of player with Gray Stained Glass Pane named " " to do nothing
                set {_slot} to 10
                loop {skpets::list::*}:
                    add 1 to {_pets}
                    set {_unlocked} to "{@petsShop_petUnlocked}"
                    set {_locked} to "{@petsShop_petLocked}"
                    replace all "[pet]" with "%loop-value%" in {_unlocked}
                    replace all "[pet]" with "%loop-value%" in {_locked}
                    if player has permission "skpets.pets.%loop-value%":
                        make a gui slot {_slot} of player with player's skull with nbt "%{skpets::pets::%loop-value%::texture}%" named "%{_unlocked}%" with lore "|| &3Informations&8:|||| &9▪ &7Type&8: &b%loop-value%|| &9▪ &7Status&8: &aUnlocked|||| &9» &aRightclick to select." to run player command "/pets set %loop-value%"
                    else if player doesn't have permission "skpets.pets.%loop-value%":
                        make a gui slot {_slot} of player with player's skull with nbt "%{skpets::pets::%loop-value%::texture}%" named "%{_locked}%" with lore "|| &3Informations&8:|||| &9▪ &7Type&8: &b%loop-value%|| &9▪ &7Status&8: &cLocked|||| &9» &cYou don't own this pet." to do nothing
                    if {_slot} is 16,25 or 34:
                        add 3 to {_slot}
                    else:
                        add 1 to {_slot}
                    if {_pets} >= 28:
                        stop loop
            else:
                message "{@Prefix} {@NoPermissions}"
                stop
        if argument-1 is "call":
            if player has permission "skpets.call":
                set {_status} to callPet( player )
                set {_message-1} to "{@callPet}"
                if {_status} is true:
                    message " {@Prefix} %{_message-1}%"
                    oorangePet(player)
                    stop
                if {_status} is false:
                    message " {@Prefix} {@myPet_withoutPet}"
                    stop
            else:
                message "{@Prefix} {@NoPermissions}"
                stop
        if argument-1 is "ride":
            if player has permission "skpets.ride":
                set {_status} to ridePet( player )
                if {_status} is false:
                    if {skpets::players::%uuid of player%::pet::type} is set:
                        if {skpets::players::%uuid of player%::pet::hunger} > 20:
                            message " {@Prefix} {@myPet_notwithYou}"
                            stop
                        else:
                            message " {@Prefix} {@myPet_hungry}"
                            stop
                    else:
                        message " {@Prefix} {@myPet_withoutPet}"
                        stop
            else:
                message "{@Prefix} {@NoPermissions}"
                stop
        if argument-1 is "hat":
            if player has permission "skpets.hat":
                set {_status} to toggleHatPet( player )
                if {_status} is false:
                    if {skpets::players::%uuid of player%::pet::type} is set:
                        if {skpets::players::%uuid of player%::pet::hunger} > 20:
                            message " {@Prefix} {@myPet_notwithYou}"
                            stop
                        else:
                            message " {@Prefix} {@myPet_hungry}"
                            stop
                    else:
                        message " {@Prefix} {@myPet_withoutPet}"
                        stop
            else:
                message "{@Prefix} {@NoPermissions}"
                stop
        if argument-1 is "despawn" or "back":
            if player has permission "skpets.despawn":
                set {_status} to despawnPet( player )
                if {_status} is true:
                    message " {@Prefix} {@despawnPet}"
                    stop
                if {_status} is false:
                    if {skpets::players::%uuid of player%::pet::type} is set:
                        message " {@Prefix} {@myPet_notwithYou}"
                        stop
                    else:
                        message " {@Prefix} {@myPet_withoutPet}"
                        stop
            else:
                message "{@Prefix} {@NoPermissions}"
                stop
        if argument-1 is "author", "version", "ver" or "info":
            message " {@Prefix} &aYoshYz Version&8: &7v1.2.5d"
            stop
        if argument-1 is "help":
            if player has permission "skpets.help":
                message "&f&l&m---------------------------------------"
                message "&a&l                        SKPETS"
                message " &9▪ /pets help"
                message " &9▪ /pets ver"
                message " &9▪ /pets profile"
                message " &9▪ /pets shop"
                message " &9▪ /pets create [<name>] [<class>] [<ID>]"
                message " &9▪ /pets delete [<name>]"
                message "&f&l&m---------------------------------------"
                stop
            else:
                message " {@Prefix} {@NoPermissions}"
                stop
				
#==========================================================================================================#
# -------------------------------------------------------------------------------------------------------- #
#                                                FEED PET                                                  #
# -------------------------------------------------------------------------------------------------------- #
#==========================================================================================================#

on rightclick on zombie:
    if {skpets::players::%uuid of player%::pet::type} is set:
        if {skpets::players::%uuid of player%::pet::entity} is set:
            if {skpets::players::%uuid of player%::pet::entity} is clicked entity:
                if player is holding apple, bread, melon, cookie, carrot, potato, baked potato or cooked fish:
                    if {skpets::players::%uuid of player%::pet::hunger} < 100:
                        remove 1 of player's held item from player's inventory
                        set {_x} to a random integer between 2 and 5
                        loop {_x} times:
                            if {skpets::players::%uuid of player%::pet::hunger} < 100:
                                add 1 to {skpets::players::%uuid of player%::pet::hunger}
                                add 1 to {skpets::players::%uuid of player%::pet::exp}
                            set {_pos} to a random integer between 2 and 3
                            show heart at the location {_pos} blocks upwards clicked entity
                            wait 3 ticks
                        levelUpPet( player )
                        stop
                    else:
                        set {_x} to a random integer between 2 and 3 
                        loop {_x} times:
                            set {_pos} to a random integer between 2 and 3
                            show angry villager at the location {_pos} blocks upwards clicked entity
                            wait 3 ticks
                        stop
                else:
                    set {_x} to a random integer between 2 and 3 
                    loop {_x} times:
                        set {_pos} to a random integer between 2 and 3
                        show angry villager at the location {_pos} blocks upwards clicked entity
                        wait 3 ticks
                    stop
                        
                
				
#==========================================================================================================#
# -------------------------------------------------------------------------------------------------------- #
#                                              SMALL EVENTS                                                #
# -------------------------------------------------------------------------------------------------------- #
#==========================================================================================================#

#Ride debugs

on inventory open:
    if player is riding:
        make the player dismount
		
on join:
    remove all heads from player's inventory
    if player is riding:
        make the player dismount
		
on disconnect:
    remove all heads from player's inventory
    if player is riding:
        make the player dismount

on command:
    if player is riding:
        make the player dismount
		
on place:
    if player is riding:
        cancel the event 
	
#Despawn

on quit:
    forcedespawnPet( player )
	
#Death drop FIX

on death of zombie:
    if "%nbt of event-entity%" contains "Silent:1":
        remove all dropped items from drops
        remove all rotten flesh from drops
        remove all heads from drops
		
#Damage

on damage:
    if "%nbt of victim%" contains "Silent:1":
        cancel the event
    if attacker is a zombie:
        if "%nbt of attacker%" contains "Silent:1":
            cancel the event