options: damage-radiation: 1 # Hearts poison-radiation: true item-lugola: 6 diamond and 4 obsidian and 64 cobblestone and 10 golden ingot lugola-duration: 60 # Time in Seconds world-name: world Function CheckPlayerPosition(Player: Player): while {_Player} is online: wait 20 ticks {radiation::range} is set {radiation::center} is set {_Player} is in "{@world-name}" if {radiation::bypass::%{_Player}%} is not set: if distance between {_Player} and {radiation::center} is greater than {radiation::range}: damage {_Player} by {@damage-radiation} hearts poison {_Player} for 35 ticks if {@poison-radiation} is true if distance between {_Player} and {radiation::center} is greater than {radiation::range}-10: send action bar "&c&LWARNING: You are near the radiation!" to {_Player} wait 10 ticks send action bar "&e&LWARNING: You are near the radiation!" to {_Player} else: while {radiation::bypass::%{_Player}%} is greater than 0: if {_Player} is online: remove 1 from {radiation::bypass::%{_Player}%} send action bar "&e&l====> &2&lLugola: &2&l%{radiation::bypass::%{_Player}%}%&2&ls &e&l<====" to {_Player} wait 1 second else: stop loop clear {radiation::bypass::%{_Player}%} if {radiation::bypass::%{_Player}%} is less than 2 Function Reset(Player: Player, m: string) :: boolean: if {radiation::verifi::%{_Player}%} is set: if {_m} = "reset": clear {radiation::range} clear {radiation::center} clear {radiation::verifi::%{_Player}%} send "&aSettings cleared successfully" to {_Player} return true command /radiation []: aliases: /rad usage: &c&l/radiation
permission: radiation.access permission message: &cYou don't have permission! trigger: if arg-1 is "center": set {radiation::center} to player's location send "&aSuccessfully Set to: &e%player' location%" if arg-1 is "set": if {radiation::center} is set: if arg-2 is set: set {radiation::range} to arg-2 send "&aDistance is set to &e%arg-2%" stop send "&cCenter is not set!" if arg-1 is "reset": set {radiation::verifi::%player%} to true send "&6&lType 'reset' on chat if you want Reset Settings" wait 10 seconds send "&cThe time is over" if {radiation::verifi::%player%} is set clear {radiation::verifi::%player%} if {radiation::verifi::%player%} is set command /lugola []: trigger: if player have {@item-lugola}: remove {@item-lugola} from player give potion named "&aLugola" with lore "&5&lMagic Potion" to player stop send "&cYou don't have required items: {@item-lugola}" on death of player: {radiation::range} is set {radiation::center} is set if distance between Player and {radiation::center} is greater than {radiation::range}: set death message to "%Player% He did not withstand radiation :(" on join: CheckPlayerPosition(Player) on chat: cancel event if Reset(Player, message) is true on consume: player is holding a potion named "&aLugola" with lore "&5&lMagic Potion" set {radiation::bypass::%player%} to {@lugola-duration}