Skbee, Skript 2.10.x
Kod:
function hideNametag(p: player):
set {_u} to uuid of {_p}
if {nametagoff::%{_u}%} is not true:
spawn an armor stand at location of {_p} with nbt nbt compound of "{Invisible:1b,Marker:1b,Invulnerable:1b}"
set {nametagoff::%{_u}%} to true
set metadata "nametag" of last spawned entity to true
make last spawned entity ride {_p}
function showNametag(p: player):
set {_u} to uuid of {_p}
if {nametagoff::%{_u}%} is true:
set {_e::*} to passengers of {_p}
kill {_e::1}
set {nametagoff::%{_u}%} to false
command /maske:
permission: "maske.vip"
permission message: "&cBu komutu kullanmak için &aVIP &colmanız gerekiyor!"
trigger:
if {nametagoff::%uuid of player%} is not true:
hideNametag(player)
send "&aAdınız gizlendi!" to player
else:
showNametag(player)
send "&aAdınız tekrar görünür oldu!" to player
on join:
if {nametagoff::%uuid of player%} is true:
hideNametag(player)
on leave:
if {nametagoff::%uuid of player%} is true:
set {_e::*} to passengers of player
kill {_e::1}
every 10 seconds:
loop all armor stands:
if metadata "nametag" of loop-entity is true:
if vehicle of loop-entity is not set:
kill loop-entity
on chat:
if {nametagoff::%uuid of player%} is true:
set chat format to "&7Gizli: &f%message%"
on stop:
loop all armor stands:
if metadata "nametag" of loop-entity is true:
kill loop-entity
