AgentGamerPro Posted June 27, 2021 Share Posted June 27, 2021 (edited) SkButtonAdd Text To Buttons! Using this skript, you can add text to buttons with simple commands! Permission is Text.Use options: prefix: &3[&bSkButton&3] permission: Text.Use command /text [<text>] [<text>] [<text>]: permission: {@permission} permission message: {@prefix} &cInsufficent Permission! trigger: if arg-1 is "clearall": if arg-2 is not set: send "{@prefix} &c&lWARNING: &cDoing /text clearall will clear ALL text from ALL buttons!%nL%&7If you wish to continue, do /text clearall confirm" to player else if arg-2 is "confirm": clear {Text::*} send "{@prefix} &aCleared all text from all buttons!" to player else: send "{@prefix} &cIncorrect argument!" to player else if player's targeted block is not a button: send "{@prefix} &cLook at a button before using this command!" to player else: if arg-1 is not set: send "{@prefix} &cUsage: &b/text (add | set | delete | clear | clearall)" to player else if arg-1 is "add": if arg-2 is not set: send "{@prefix} &cUsage: &b/text add (text)" to player else: if arg-3 is not set: set {_text} to colored arg-2 add {_text} to {Text::%location of player's targeted block%::*} send colored "{@prefix} &aSuccessfully added %{_text}% &ato the text!" to player else: set {_text} to colored "%arg-2% %arg-3%" add {_text} to {Text::%location of player's targeted block%::*} send colored "{@prefix} &aSuccessfully added %{_text}% &ato the text!" to player else if arg-1 is "set": if arg-2 is not set: send "{@prefix} &cUsage: &b/text set (line) (text)" to player else: set {_integer} to arg-2 set {_integer} to {_integer} parsed as integer if {_integer} is not a integer: send "{@prefix} &cUsage: &b/text set (line) (text)" to player else: if arg-3 is not set: send "{@prefix} &cUsage: &b/text set (line) (text)" to player else: loop {Text::%location of player's targeted block%::*}: add 1 to {_index} if {_index} = {_integer}: set {Text::%location of player's targeted block%::%loop-index%} to colored arg-3 set {_sendtext} to colored arg-3 stop loop if {_sendtext} is set: send "{@prefix} &aSuccessfully set line %{_integer}% &ato %{_sendtext}%&a!" to player else: send "{@prefix} &cThat is not a line!" to player else if arg-1 is "delete": if arg-2 is not set: send "{@prefix} &cUsage: /text delete (line)" to player else: set {_integer} to arg-2 set {_integer} to {_integer} parsed as integer if {_integer} is not a integer: send "{@prefix} &cUsage: &b/text delete (line)" to player else: loop {Text::%location of player's targeted block%::*}: add 1 to {_index} if {_index} = {_integer}: delete {Text::%location of player's targeted block%::%loop-index%} stop loop send "{@prefix} &aSuccessfully deleted line %{_integer}%&a!" to player else if arg-1 is "clear": clear {Text::%location of player's targeted block%::*} send "{@prefix} &aCleared all text from this button!" to player on rightclick on button: loop {Text::%location of player's targeted block%::*}: send "%loop-value%" to player Edited June 27, 2021 by AgentGamerPro Fixed Some Bugs Lifestealed | Minecraft Servers [VIP] 12/26/20 - 10/27/2021[PRO] 12/27/21 - Present Link to comment Share on other sites More sharing options...
ItsKirby Posted June 27, 2021 Share Posted June 27, 2021 2 hours ago, AgentGamerPro said: SkButtonAdd Text To Buttons! Using this skript, you can add text to buttons with simple commands! Permission is Text.Use options: prefix: &3[&bSkButton&3] permission: Text.Use command /text [<text>] [<text>] [<text>]: permission: {@permission} permission message: {@prefix} &cInsufficent Permission! trigger: if arg-1 is "clearall": if arg-2 is not set: send "{@prefix} &c&lWARNING: &cDoing /text clearall will clear ALL text from ALL buttons!%nL%&7If you wish to continue, do /text clearall confirm" to player else if arg-2 is "confirm": clear {Text::*} send "{@prefix} &aCleared all text from all buttons!" to player else: send "{@prefix} &cIncorrect argument!" to player else if player's targeted block is not a button: send "{@prefix} &cLook at a button before using this command!" to player else: if arg-1 is not set: send "{@prefix} &cUsage: &b/text (add | set | delete | clear | clearall)" to player else if arg-1 is "add": if arg-2 is not set: send "{@prefix} &cUsage: &b/text add (text)" to player else: if arg-3 is not set: set {_text} to colored arg-2 add {_text} to {Text::%location of player's targeted block%::*} send colored "{@prefix} &aSuccessfully added %{_text}% &ato the text!" to player else: set {_text} to colored "%arg-2% %arg-3%" add {_text} to {Text::%location of player's targeted block%::*} send colored "{@prefix} &aSuccessfully added %{_text}% &ato the text!" to player else if arg-1 is "set": if arg-2 is not set: send "{@prefix} &cUsage: &b/text set (line) (text)" to player else: set {_integer} to arg-2 set {_integer} to {_integer} parsed as integer if {_integer} is not a integer: send "{@prefix} &cUsage: &b/text set (line) (text)" to player else: if arg-3 is not set: send "{@prefix} &cUsage: &b/text set (line) (text)" to player else: loop {Text::%location of player's targeted block%::*}: add 1 to {_index} if {_index} = {_integer}: set {Text::%location of player's targeted block%::%loop-index%} to colored arg-3 set {_sendtext} to colored arg-3 stop loop if {_sendtext} is set: send "{@prefix} &aSuccessfully set line %{_integer}% &ato %{_sendtext}%&a!" to player else: send "{@prefix} &cThat is not a line!" to player else if arg-1 is "delete": if arg-2 is not set: send "{@prefix} &cUsage: /text delete (line)" to player else: set {_integer} to arg-2 set {_integer} to {_integer} parsed as integer if {_integer} is not a integer: send "{@prefix} &cUsage: &b/text delete (line)" to player else: loop {Text::%location of player's targeted block%::*}: add 1 to {_index} if {_index} = {_integer}: delete {Text::%location of player's targeted block%::%loop-index%} stop loop send "{@prefix} &aSuccessfully deleted line %{_integer}%&a!" to player else if arg-1 is "clear": clear {Text::%location of player's targeted block%::*} send "{@prefix} &aCleared all text from this button!" to player on rightclick on button: loop {Text::%location of player's targeted block%::*}: send "%loop-value%" to player Cool idea! Yo who actually reads these [Vip] - 12/29/2020[Pro] - 1/25/2022 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now