I wish that killing the player the attacker is given the variable of {_openchest} and only he can open that chest and the rest of the players can not do it, if they helped me with that I would be eternally grateful
here is the code:
here is the code:
code_language.skript:
options:
TimeBomb-Holo: &6The explosion will be in
nocleanpermission: nocleanup.admin
command /nocleanup:
permission: {@nocleanpermission}
permission message: &7puto no
trigger:
open chest with 2 rows named "&6&lBuild Configuration" to player
format slot 2 of player with chest named "&e&lNoCleanUp" with lore "&7&lDesactivar el timebomb De Su Core Actual" to be unstealable
format slot 6 of player with chest named "&e&lNoCleanUp" with lore "&7&lDesactivar el timebomb De Su Core Actual" to be unstealable
format slot 11 of player with 160:5 named "&aActivar" to close then run [make player execute command "/§onnoclean"]
format slot 15 of player with 160:14 named "&cDesactivar" to close then run [make player execute command "/§offnoclean"]
command /§onnoclean:
permission: {@nocleanpermission}
trigger:
set {timebomb} to true
message "&as &aEl NoFall Ha Sido &aActivado."
command /§offnoclean:
permission: {@nocleanpermission}
trigger:
set {timebomb} to false
message "&a &aEl NoFall Ha Sido &cDesactivado"
on load:
set {timebomb} to false
on death:
if {timebomb} is true:
if victim is a player:
play "ORB_PICKUP" to attacker
set the block at location of victim to chest
set {_dchest} to the victim's inventory
set {_dchest} to block at location of victim
set block west of block at location of victim to chest
add {_openchest} to attacker
add inventory of victim to {_dchest}
add helmet of victim to {_dchest}
add chestplate of victim to {_dchest}
add leggings of victim to {_dchest}
add boots of victim to {_dchest}
clear drops
set {_holo} to position of block 1.1 meters above {_dchest}
set {_x} to x-coordinate of {_dchest}
add 0.5 to {_x}
set {_y} to y-coordinate of {_dchest}
add 0.5 to {_y}
set {_z} to z-coordinate of {_dchest}
add 0.5 to {_z}
if {_x} is less than 0:
set {_xs} to 1
set {_x} to -1*{_x}
else:
set {_xs} to 0
if {_z} is less than 0:
set {_zs} to 1
set {_z} to -1*{_z}
else:
set {_zs} to 0
set {_loc} to (10000000000*{_xs} + 1000000000*{_zs} + 1000000*{_x} + 1000*{_y} + {_z})
create hologram "{@TimeBomb-Holo} &a30s" at location of {_holo} for 1 second
wait 1 second
create hologram "{@TimeBomb-Holo} &a29s" at location of {_holo} for 1 second
wait 1 second
create hologram "{@TimeBomb-Holo} &a28s" at location of {_holo} for 1 second
wait 1 second
create hologram "{@TimeBomb-Holo} &a27s" at location of {_holo} for 1 second
wait 1 second
create hologram "{@TimeBomb-Holo} &a26s" at location of {_holo} for 1 second
wait 1 second
create hologram "{@TimeBomb-Holo} &a25s" at location of {_holo} for 1 second
wait 1 second
create hologram "{@TimeBomb-Holo} &a24s" at location of {_holo} for 1 second
wait 1 second
create hologram "{@TimeBomb-Holo} &a23s" at location of {_holo} for 1 second
wait 1 second
create hologram "{@TimeBomb-Holo} &a22s" at location of {_holo} for 1 second
wait 1 second
create hologram "{@TimeBomb-Holo} &a21s" at location of {_holo} for 1 second
wait 1 second
create hologram "{@TimeBomb-Holo} &a20s" at location of {_holo} for 1 second
wait 1 second
create hologram "{@TimeBomb-Holo} &a19s" at location of {_holo} for 1 second
wait 1 second
create hologram "{@TimeBomb-Holo} &a18s" at location of {_holo} for 1 second
wait 1 second
create hologram "{@TimeBomb-Holo} &a17s" at location of {_holo} for 1 second
wait 1 second
create hologram "{@TimeBomb-Holo} &a16s" at location of {_holo} for 1 second
wait 1 second
create hologram "{@TimeBomb-Holo} &a15s" at location of {_holo} for 1 second
wait 1 second
create hologram "{@TimeBomb-Holo} &a14s" at location of {_holo} for 1 second
wait 1 second
create hologram "{@TimeBomb-Holo} &a13s" at location of {_holo} for 1 second
wait 1 second
create hologram "{@TimeBomb-Holo} &a12s" at location of {_holo} for 1 second
wait 1 second
create hologram "{@TimeBomb-Holo} &a11s" at location of {_holo} for 1 second
wait 1 second
create hologram "{@TimeBomb-Holo} &a10s" at location of {_holo} for 1 second
wait 1 second
create hologram "{@TimeBomb-Holo} &a9s" at location of {_holo} for 1 second
wait 1 second
create hologram "{@TimeBomb-Holo} &68s" at location of {_holo} for 1 second
wait 1 second
create hologram "{@TimeBomb-Holo} &67s" at location of {_holo} for 1 second
wait 1 second
create hologram "{@TimeBomb-Holo} &66s" at location of {_holo} for 1 second
wait 1 second
create hologram "{@TimeBomb-Holo} &c5s" at location of {_holo} for 1 second
wait 1 second
create hologram "{@TimeBomb-Holo} &c4s" at location of {_holo} for 1 second
wait 1 second
create hologram "{@TimeBomb-Holo} &c3s" at location of {_holo} for 1 second
wait 1 second
create hologram "{@TimeBomb-Holo} &c2s" at location of {_holo} for 1 second
wait 1 second
delete {_openchest} to attacker
create hologram "{@TimeBomb-Holo} &41s" at location of {_holo} for 1 second
wait 1 second
set block at location of victim to air
strike lightning effect at {_dchest}
create an explosion of force 4 at {_dchest}
clear dropped items
on right click on a chest: