Jump to content

Flight script (free)


Ramina__

Recommended Posts

CODE: 

 

options:
    cooldownmsg: {@logo}>> &cThis is on cooldown!
    permissionm: &cYou need a staff rank, &6&k|&6MVP&c++&6&k| &cOr &6&k|&4YOU&fTUBE&6&k| &cRank to access this command

    logo: &4&lSERVERNAME   

command /fly [<player>]:
    trigger:
        if player does not have permission "helper":
            if player does not have permission "youtube.nick":
                send "{@permissionm}"
            else:
                if {flightYT.%player%} is not set:
                    if {flightYTcooldown.%player%} is not set:
                        if arg-1 is not set:
                            set {flightYT.%player%} to true
                            set {flightYTcooldown.%player%} to true
                            send "{@logo}>> &4&lFLIGHT &cHas been enabled for 30 seconds!"
                            enable flight for player
                            wait 25 second
                            send "{@logo}>> FLIGHT &cDisabling in 5 seconds!"
                            wait 1 second
                            send "{@logo}>> FLIGHT &cDisabling in 4 seconds!"
                            wait 1 second
                            send "{@logo}>> FLIGHT &cDisabling in 3 seconds!"
                            wait 1 second
                            send "{@logo}>> FLIGHT &cDisabling in 2 seconds!"
                            wait 1 second
                            send "{@logo}>> FLIGHT &cDisabling!"
                            delete {flightYT.%player%}
                            disable flight for player
                            wait 30 second
                            delete {flightYTcooldown.%player%}
                        else:
                            send "{@permissionm}"
                    else:
                        send "{@cooldownmsg}"
                else:
                    disable flight for player
                    delete {flightYT.%player%}
                    wait 30 second
                    delete {flightYTcooldown.%player%}
        else:
            if arg-1 is not set:
                if {flightSTAFF.%player%} is not set:
                    set {flightSTAFF.%player%} to true
                    send "{@logo}>> &a&lEnabled &4&lFLIGHT&c!"
                    enable flight for player
                else:
                    disable flight for player
                    delete {flightSTAFF.%player%}
                    send "{@logo}>> &c&lDisabled &4&lFLIGHT!"
            else:
                if {flightSTAFF.%arg-1%} is not set:
                    enable flight for arg-1
                    set {flightSTAFF.%arg-1%} to true
                    send "{@logo}>> &a&lEnabled &4&lFLIGHT &cfor &c&l%arg-1%&c!" to player
                    send "&4&lVelvetSurv>> &c&l%player% &a&lEnabled &4&lFLIGHT &cfor you!" to arg-1
                else:
                    delete {flightSTAFF.%arg-1%}
                    disable flight for arg-1
                    send "{@logo}>> &c&lDisabled &4&lFLIGHT &cfor &c&l%arg-1%&c!" to player
                    send "{@logo}>> &c&l%player% &c&lDisabled &4&lFLIGHT &cfor you!"
                            

Link to comment
Share on other sites

Waiting 30 seconds and deleting the cooldown variable after isn't the most efficient way of doing cooldowns with skript.

Edit: You could do 

if player does not have permission "helper" or "youtube.nick":

instead of 

  if player does not have permission "helper":
            if player does not have permission "youtube.nick":

 

Edited by skPizza
  • Like 1
I used to play Minehut I guess?
Yeah, I still watch the forums for some reason. (15/5/2023)
Link to comment
Share on other sites

I mean, why all this fancy stuff when you can just make it with couple of lines? People most likely uses it for staff flight and I wouldn't see why staff would care if there isn't fancy stuff in /fly.

 

Owner of play.hiveminez.net

 

⊱------------------------------⊰

Joined Minehut on 1/28/2021 (Same day I got Minecraft)

[VIP] - 3/14/2021

[LEGEND] - 5/27/2021

⊱------------------------------⊰

Discord - NotKaizo#0001

In-game name - iKaizo_

If you need any help, feel free to contact me.

Link to comment
Share on other sites

3 hours ago, NotKaizo said:

I mean, why all this fancy stuff when you can just make it with couple of lines? People most likely uses it for staff flight and I wouldn't see why staff would care if there isn't fancy stuff in /fly.

I don't make it a couple of lines because that isn't a long enough time to to take my mind off the bad thought. I always have self doubt about these things so I rarely post my own things.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...