on left-click on sponge:
if name of player's tool is "&eSünger &aKırıcı":
set event-block to air
give a sponge to player
set {_y} to "%lore of player's tool%"
set {_y} to "%uncoloured {_y}%"
replace all "Kullanım Hakkı: " with "" in {_y}
replace all " " with "" in {_y}
set {_y} to "%{_y}%" parsed as number
if {_y} > 0:
set lore of player's tool to "&6Kullanım Hakkı: %{_y} - 1%"
set {_y} to "%lore of player's tool%"
set {_y} to "%uncoloured {_y}%"
replace all "Kullanım Hakkı: " with "" in {_y}
replace all " " with "" in {_y}
set {_y} to "%{_y}%" parsed as number
{_y} <= 0:
remove player's tool from player's inventory
command /sünger:
permission: sk.admin
trigger:
give a shears named "&eSünger &aKırıcı" with lore "&6Kullanım Hakkı: 3" to player