options: cooldown: 60 #//Czas, który trzeba odczekać przed następnym okardnięciem. on click on entity: if player's tool is diamond: if clicked entity is a player: if {czas::%player%} is smaller than 1: set {_x} to clicked entity's balance set {_x} to {_x} parsed as number set {_s} to random integer between 0 and {_x} add {_s} to player's balance send "&aOkradnales gracza %clicked entity%" to the player send "&aPieniadze, ktore dostales to: &f&n%{_s}%" to the player send "&aGracz %player% Cie okardl!" to clicked entity send "&aPieniadze, ktore Ci zabral to: &f&n%{_s}%" to clicked entity set {czas::%player%} to {@cooldown} stop else: send "&7Musisz jeszcze odczekac: &f&n%{czas::%player%}%" to the player stop else: send "&cNie mozesz zaatakowac tego gracza" to the player stop every 1 second: loop {czas::*}: if {czas::%loop-index%} is not set: set {czas::%loop-index%} to 0 stop else if {czas::%loop-index%} is larger than 0: remove 1 from {czas::%loop-index%} stop