Skript Basit Rastgele Kutu Skript

PowerArticle

Yönetici
Katılım
11 Ocak 2021
Mesajlar
63
Tepkime puanı
23
Puanları
6
Konum
Adana
Bir çok kullanıcının aramış olduğu basit ama işe yarar bi skriptlerden kutu skriptini paylaşmaya devam ediyoruz.

Kod:
options:
    name: "&eRandom Box"
    name2: &eRandom Box &8»

on rightclick on piston:
    if player doesn't have 1 diamond named "&eRandom Box &bKey":
        send "&cYou dont have &6Key &cto open a Random Box"
        stop
    remove 1 diamond named "&eRandom Box &bKey" from player
    cancel event
    open chest with 5 rows named {@name} to player
    wait a tick
    #!Add your items below
    
    add diamond helmet of protection 4 named "&cHelmet" to {_roll::*}
    add diamond leggings of protection 4 named "&cLeggings" to {_roll::*}
    add diamond boots of protection 4 named "&cBoots" to {_roll::*}
    add diamond chestplate of protection 4 named "&cChestplate" to {_roll::*}
    add 1 emerald named "&aEmerald" to {_roll::*}
    
    #!Speed option safety net, so running 0 ticks doesn't crash your server
    
    set {_speedFinal} to 2
    #!Selector settings
    set {_Selector1} to 21
    set {_Selector2} to 23
    set {rolling.%player%} to true
    #!Main code below. This random integer is the length of the crate opening, which is random
    loop (random integer between 11 and 40) times:
        if inventory name of player's current inventory is not {@name}:
            stop
        #The 11 tells the script how many items to save
        set {_sel} to 11
        loop 11 times:
            #!This is the data saving for the scroll effect
            set {_sel2} to {_sel} - 1
            set {_item::%{_sel}%} to {_item::%{_sel2}%}
            subtract 1 from {_sel}
        set {_item::1} to a random element out of {_roll::*}
        #!This below just updates the GUI (53 means max slots per chest)
        loop integers between 0 and 44:
            if loop-number-2 is {_Selector1} or {_Selector2}:
                set slot loop-number-2 of player's current inventory to shiny light green stained glass pane named "&aYOUR ITEM"
            else:
                set slot loop-number-2 of player's current inventory to black stained glass pane named ""
            loop 11 times:
                if loop-number-3 = 1:
                    set slot 4 of player's current inventory to {_item::%loop-number-3%}
                else if loop-number-3 = 2:
                    set slot 13 of player's current inventory to {_item::%loop-number-3%}
                else if loop-number-3 = 3:
                    set slot 22 of player's current inventory to {_item::%loop-number-3%}
                else if loop-number-3 = 4:
                    set slot 31 of player's current inventory to {_item::%loop-number-3%}
                else if loop-number-3 = 5:
                    set slot 40 of player's current inventory to {_item::%loop-number-3%}
                else if loop-number-3 = 6:
                    set slot 49 of player's current inventory to {_item::%loop-number-3%}
        #!This below is just sound. It plays it at the location of the player, so you can change it to client side sounds, etc.
        add 1 to {_sound}
        if {_sound} > 3:
            set {_sound} to 1
        if {_sound} = 1:
            play note pling at player with pitch 2
        if {_sound} = 2:
            play note pling at player with pitch 1
        if {_sound} = 3:
            play note pling at player with pitch 0.5
        #!This below causes the crate to slow down when it gets closer to the end of the animation. The more the percent, the longer the tick delay will be.
        add 1 to {_speed}
        #!This below is the ticks per lowering. Meaning it will lower the speed per every X number of loops
        if {_speed} is 5:
            set {_speed} to 0
            add 1 to {_speedFinal}
        loop {_speedFinal} times:
            wait a tick
    give player slot 22 of player's current inventory
    close player's inventory
    play note pling at player with pitch 1
on inventory click:
    if inventory name of player's current inventory is {@name}:
        cancel event

command /key:
    permission: key.use
    permission message: {@name2} &cYou're Doesn't have Permissions.
    trigger:
        give player 1 diamond named "&eRandom Box &bKey"
        send "{@name2} &aYou have get &bKey"
        stop

9b731c103663bf30083f329cd9c7f05c6d2bf131

Komut ve perm​
Command to get the key
- /key -
Permissions = key.use


 
  • Etiketler
    basit skriptler kasa skripti kutu skripti randombox