Jump to content

Prefix Skript (open source)


Cerial_Killer

Recommended Posts

This skript is 100% free to use, no need to credit me! The available commands are:

- /prefix set <prefix> - Sets the player's prefix

- /prefix on - Toggles the prefix on

- /prefix off - Toggles the prefix off

command /prefix [<text>] [<text>]:
    permission: prefix.use
    permission message: &cYou need &8[&bJesus&6+&8] &cto execute this!
    trigger:
        if arg 1 is "set":
            if arg 2 is set:
                if arg 2 contains "&k":
                    send "&8[&bPrefix&8] &bYour prefix contains an &3& k! &bPlease use another prefix!"
                else:
                    set {prefix.%player%} to colored arg 2
                    set {prefixtoggled.%player%} to true
                    send "&8[&bPrefix&8] &bYou have set your prefix to: %colored arg 2%&b!"
        if arg 1 is "on":
            if {prefixtoggled.%player%} is false:
                set {prefixtoggled.%player%} to true
                send "&8[&bPrefix&8] &bYou have enabled your prefix successfully!"
            else:
                send "&8[&bPrefix&8] &cThe prefix is already enabled!"
        if arg 1 is "off":
            if {prefixtoggled.%player%} is true:
                set {prefixtoggled.%player%} to false
                send "&8[&bPrefix&8] &bYou have disabled your prefix successfully!"
            else:
                send "&8[&bPrefix&8] &cThe prefix is already disabled!"
                
on chat:
    if {prefix.%player%} is set:
        if {prefixtoggled.%player%} is true:
            cancel event
            send "{prefix.%player%} %player%&7: &f%message%" to all players
        else:
            stop
    else:
        stop

 

 

Link to comment
Share on other sites

marking it as (open source) serves no purpose because you giving the script away makes it open source

unless you obfuscated the script

 

pretty neat script though, keep up the good work

VIP since January 7th, 2020

Support since September 19th, 2020

Helper since November 3rd, 2020

Moderator since March 8th, 2021

unknown.png

5.png.e14b1bf83edf0ac2edc1bfb822177184.png

image.png.fe30b7b2c0be5a541ba4ed2187b23030.png

Link to comment
Share on other sites

  • 2 months later...
20 minutes ago, youMADison said:

When i type "/prefix set (prefix) it sets it, then i type in chat and it says "{Prefix.youmadison} youMADison: poopy

help

Change where it says
 send "{prefix.%player%} %player%&7: &f%message%" to all players 
in the on chat event to 
send "%{prefix.%player%}% %player%&7: &f%message%" to all players

And then it shouldn't do that.

And you shouldn't reply to posts that have been inactive for more than a month because that is necroposting and isn't allowed. 

Discord - tarna256

In-game name - _Tarna_

Website - https://tarna.dev
Paste Site: https://paste.tarna.dev

---------------------------------------------------------

[VIP] - 7/27/2020

Community Support - 7/8/20 | 11/3/20

Helper  - 11/3/20 - 2/21/21

Moderator - 2/21/21 - 5/17/21

❤️ - 5/17/21 - now

Moderator - 12/20/22 - now

---------------------------------------------------------

image.png.70849a9b84e0347ce107b8e3eaee312c.pngimage.png.2111009afbd8bef10966ba9ede35a199.png

Link to comment
Share on other sites

Hello! Please do not reply to topics that haven't been active in over a month. Thanks in advance! For future reference, please take a look at our rules.

LOCKED

Quote

“When life gives you lemons, don't make lemonade. Make life take the lemons back! Get mad!"

Default - 12/12/2015

[VIP] - 10/8/2018

[JR.MOD] - 9/12/2020

[MOD] - 10/14/2020

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...