# _ _ _ ___ _ ___ ____ ____ _ __ __ ____ # ___ | | __ | | | | / _ \ | | / _ \ / ___| | _ \ / \ | \/ | / ___| # / __| | |/ / | |_| | | | | | | | | | | | | | _ | |_) | / _ \ | |\/| | \___ \ # \__ \ | < | _ | | |_| | | |___ | |_| | | |_| | | _ < / ___ \ | | | | ___) | # |___/ |_|\_\ |_| |_| \___/ |_____| \___/ \____| |_| \_\ /_/ \_\ |_| |_| |____/ # #Autohor: YoshYz #Version: 1.2.0a #==========================================================================================================# # -------------------------------------------------------------------------------------------------------- # # OPTIONS # # -------------------------------------------------------------------------------------------------------- # #==========================================================================================================# options: #Main Things: Prefix: &9▪ skHolo&9> NoPermissions: &cYou don't have the permission to execute this command. #==========================================================================================================# # -------------------------------------------------------------------------------------------------------- # # FUNCTIONS # # -------------------------------------------------------------------------------------------------------- # #==========================================================================================================# function createHolo(name: text, loc: location , lines: integer): set {holograms::list::%{_name}%} to true set {holograms::holo-%{_name}%::location} to {_loc} loop {_lines} times: wait 2 ticks set {holograms::holo-%{_name}%::line-%loop-number%::text} to "&7Default line&8: &b%loop-number%" make console execute command "/summon Area_Effect_Cloud %x-coords of {_loc}% %y-coords of {_loc}% %z-coords of {_loc}% {Duration:2147483647,CustomName:""%{holograms::holo-%{_name}%::line-%loop-number%::text}%"",CustomNameVisible:1b}" add 0.4 to y-coords of {_loc} function deleteHolo(name: text): set {_location} to {holograms::holo-%{_name}%::location} loop 5 times: if {holograms::holo-%{_name}%::line-%loop-number%::text} is set: loop all entities in radius 1 around {_location}: kill loop-entity delete loop-entity add 0.4 to y-coords of {_location} delete {holograms::list::%{_name}%} clear {holograms::holo-%{_name}%::*} function editHolo(name: text , line: integer , newtext: text): if {_newtext} contains "[<3]": replace all "[<3]" with "❤" in {_newtext} if {_newtext} contains "[star]": replace all "[star]" with "★" in {_newtext} if {_newtext} contains "[*]": replace all "[*]" with "●" in {_newtext} if {_newtext} contains "[>]": replace all "[>]" with "►" in {_newtext} if {_newtext} contains "[+]": replace all "[+]" with "▪" in {_newtext} set {_location} to location of {holograms::holo-%{_name}%::location} if {_line} isn't 1: loop {_line} times: add 0.52 to y-coords of {_location} loop all entities in radius 0.5 around {_location}: add "{CustomName:""%coloured {_newtext}%""}" to nbt of loop-entity set {holograms::holo-%{_name}%::line-%{_line}%::text} to "%{_newtext}%" stop loop #==========================================================================================================# # -------------------------------------------------------------------------------------------------------- # # MAIN CODE # # -------------------------------------------------------------------------------------------------------- # #==========================================================================================================# command /holo [] [] [] []: trigger: if argument-1 isn't set: if player has permission "holo.help": make player execute command "/holo help" stop else: make player execute command "/holo info" stop if argument-1 is "create": if player has permission "holo.create": if argument-2 is set: if argument-3 is 1, 2, 3, 4 or 5: if {holograms::list::%arg-2%} isn't set: createHolo( "%arg-2%" , player's location , arg-3 ) message " {@Prefix} &7You created a new holo named &3%arg-2% &7with &b%arg-3% &7lines." message " {@Prefix} &7Edit your holo using: &a/holo edit [name] [line] [text]" stop else: message " {@Prefix} &7This name is already used for another holo." stop else: message " {@Prefix} &7You need to write the number of lines. &8( &9Max 5 &8)" stop else: message " {@Prefix} &7You need to write the name of holo." stop else: message " {@Prefix} {@NoPermissions}" stop if argument-1 is "delete": if player has permission "holo.delete": if argument-2 is set: if {holograms::list::%arg-2%} is set: deleteHolo( "%arg-2%" ) message " {@Prefix} &7You deleted the holo named &c%arg-2%&7." stop else: message " {@Prefix} &7This holo doesn't exist." stop else: message " {@Prefix} &7You need to write the name of holo." stop else: message " {@Prefix} {@NoPermissions}" stop if argument-1 is "edit": if player has permission "holo.edit": if argument-2 is set: if argument-3 is 1, 2, 3, 4 or 5: if argument-4 is set: if {holograms::list::%arg-2%} is set: editHolo( "%arg-2%" , arg-3 , "%arg-4%" ) message " {@Prefix} &7You edited the line &b%arg-3% &7of the holo &3%arg-2%&7." stop else: message " {@Prefix} &7You need to write the new text." stop else: message " {@Prefix} &7You need to write the line number." stop else: message " {@Prefix} &7You need to write the name of holo." stop else: message " {@Prefix} {@NoPermissions}" stop if argument-1 is "list": if player has permission "holo.list": set {_number} to 1 loop {holograms::list::*}: message " &8[&9%{_number}%&8] &3%loop-index%" add 1 to {_number} stop else: message " {@Prefix} {@NoPermissions}" stop if argument-1 is "author", "version", "ver" or "info": message " {@Prefix} &aYoshYz Version&8: &7v1.2.0a" stop if argument-1 is "help": if player has permission "holo.help": message "&f&l&m---------------------------------------" message "&a&l &3&lHOLOGRAMS" message " &9▪ /holo create [] []" message " &9▪ /holo delete []" message " &9▪ /holo edit [] [] []" message " &9▪ /holo list" message " &9▪ /holo help" message " &9▪ /holo ver" message "&f&l&m---------------------------------------" stop else: message " {@Prefix} {@NoPermissions}" stop