Im Stupid Please Help

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Evoranz

Member
Oct 18, 2023
4
0
1
16
Im making a /invis command that should allow me to use it on any player
However I have no idea how to pass the player as an argument to inside the skript.
My code:
Command /invis <player>:
permission: skript.invistru
Trigger:
If {invis} is not set:
Send "&bInvis mode is now &3enabled&b." to player
apply invisibility of tier 1 without particles to player for 99999 seconds
Set {invis} to true
Stop
Send "&bInvis mode is now &3disabled&b." to player
remove invisibility from player
Delete {invis}
Stop
 
Just use arg-1 instead of player, since the command argument is expecting a player object. The 'player' in this command would be the command sender.
 
Sup, you can try this:
Code:
command /invis <player>:
    permission: skript.invistru
    trigger:
        if {invis.%arg-1%} is not set:
            send "&bInvis mode is now &3enabled&b." to arg-1
            apply invisibility of tier 1 without particles to arg-1 for 99999 seconds
            set {invis.%arg-1%} to true
        else:
            send "&bInvis mode is now &3disabled&b." to arg-1
            remove invisibility from arg-1
            delete {invis.%arg-1%}
 
Sup, you can try this:
Code:
command /invis <player>:
    permission: skript.invistru
    trigger:
        if {invis.%arg-1%} is not set:
            send "&bInvis mode is now &3enabled&b." to arg-1
            apply invisibility of tier 1 without particles to arg-1 for 99999 seconds
            set {invis.%arg-1%} to true
        else:
            send "&bInvis mode is now &3disabled&b." to arg-1
            remove invisibility from arg-1
            delete {invis.%arg-1%}
Thank you, and if you have a second, how do i make it so if they do /invis it will just do them?
is that a alias?
 
Im not sure if i understand you, but if you want to make it so the player him self can apply invis, you will just replace "arg-1" with "player".
Code:
command /invis:
    permission: skript.invistru
    trigger:
        if {invis.%player%} is not set:
            send "&bInvis mode is now &3enabled&b." to player
            apply invisibility of tier 1 without particles to player for 99999 seconds
            set {invis.%player%} to true
        else:
            send "&bInvis mode is now &3disabled&b." to player
            remove invisibility from player
            delete {invis.%player%}
 
Im not sure if i understand you, but if you want to make it so the player him self can apply invis, you will just replace "arg-1" with "player".
Code:
command /invis:
    permission: skript.invistru
    trigger:
        if {invis.%player%} is not set:
            send "&bInvis mode is now &3enabled&b." to player
            apply invisibility of tier 1 without particles to player for 99999 seconds
            set {invis.%player%} to true
        else:
            send "&bInvis mode is now &3disabled&b." to player
            remove invisibility from player
            delete {invis.%player%}
no, I mean if they run /invis they get invised but if they do /invis herobrine he gets invised
 
Im not sure if i understand you, but if you want to make it so the player him self can apply invis, you will just replace "arg-1" with "player".
Code:
command /invis:
    permission: skript.invistru
    trigger:
        if {invis.%player%} is not set:
            send "&bInvis mode is now &3enabled&b." to player
            apply invisibility of tier 1 without particles to player for 99999 seconds
            set {invis.%player%} to true
        else:
            send "&bInvis mode is now &3disabled&b." to player
            remove invisibility from player
            delete {invis.%player%}
don't use .%player% use ::%player's uuid%
 
When you choose Skript Help, you can rest assured that your coursework will be handled by experts in the field. Our dedicated team of tutors and writers are highly qualified and have extensive experience in a wide range of subjects. They are committed to delivering high-quality work that meets the requirements of your course.
Regards. Do My Course For Me-Do My Online Course
Nice story bro.

Edit: Yo, alex cooper thought i need help with my class but when i said i don't need help, he said bye!!! Your "Course For Me-Do My Online Course" is defently a scam!
 
no, I mean if they run /invis they get invised but if they do /invis herobrine he gets invised
i made this it should do that i also made it so if they die they keep their invis :emoji_slight_smile:
Code:
command /invis [<player>]:
    permission: skript.invistru
    trigger:
        if arg-1 is set:
            if {invis::%arg-1's uuid%} is not set:
                send "&bInvis mode is now &3enabled&b." to arg-1
                apply infinite invisibility of tier 1 without particles to arg-1
                set {invis::%arg-1's uuid%} to true
            else:
                send "&bInvis mode is now &3disabled&b." to arg-1
                remove invisibility from arg-1
                delete {invis::%arg-1's uuid%}
        else:
            if {invis::%player's uuid%} is not set:
                send "&bInvis mode is now &3enabled&b." to player
                apply infinite invisibility of tier 1 without particles to player
                set {invis::%player's uuid%} to true
            else:
                send "&bInvis mode is now &3disabled&b." to player
                remove invisibility from player

on death of player:
    if {invis::%player's uuid%} is true:
        set {effects::%player's uuid%::*} to player's potion effects

on respawn:
    if {invis::%player's uuid%} is true:
        apply {effects::%player's uuid%::*} to player
        delete {effects::%player's uuid%::*}