options: ammo : 1000 karabin : Nether Brick variables: {karabin.%player%.use} = false {karabin.%player%.status} = false {karabin.%player%.pow} = 1 command /karabin [] []: permission: karabin.* trigger: if arg 1 is "pow" or "power" or "moc": if arg 2 is set: set {_arg2} to arg-2 if {_arg2} < 10: if {_arg2} > 0: set {_pow} to arg-2 set {karabin.%player%.pow} to 10-{_pow} send "&aUstawiles moc karabinu na &e%{_pow}%&a!" else: send "&cPodaj wartosc mocy od 1 do 9!" else: send "&cPodaj wartosc mocy od 1 do 9!" if arg 1 is "on": set {karabin.%player%.use} to true send "&aKarabin zostal odblokowany, aby wlaczyc i wylaczyc kliknij LPM na karabin!" if arg 1 is "off": set {karabin.%player%.use} to false send "&aKarabin zostal zablokowany!" if arg 1 is "give": give player {@karabin} named "&2Karabin" send "&aOtrzymales karabin!" On leftclick holding {@karabin}: if {karabin.%player%.use} = true: if {karabin.%player%.status} = false: set {karabin.%player%.status} to true send "&aWlaczyles karabin! &e{@ammo} ammo &ana jedna serie!" set {_now} to now loop {karabin.%player%.pow} times: wait 1 tick set {_towait} to difference between {_now} and now loop {@ammo} times: if {karabin.%player%.status} = true: if player is holding {@karabin}: wait {_towait} shoot an arrow from player at speed 99 else: set {karabin.%player%.status} to false send "&aWylaczyles karabin zmieniajac slot w ekwipunku!" else: set {karabin.%player%.status} to false stop send "&aWylaczyles karabin!" set {karabin.%player%.status} to false send "&cKoniec ammo!" stop if {karabin.%player%.status} = true: send "&aWylaczyles karabin!" set {karabin.%player%.status} to false stop