Skip to content
home/templates/fly toggle (/fly)
commandsBeginnermc 1.20.x – 1.21.x20 lines

fly toggle (/fly)

toggles flight mode for the player or a target. permission-gated. persists across logouts.

vanilla Skriptno addons required.
fly-toggle.sk20 lines
command /fly [<player>]:
    permission: fly.use
    trigger:
        set {_target} to arg-1 ? player
        if {_target} can fly:
            disable flight mode for {_target}
            set flight speed of {_target} to 0.1
            send "&cFlight disabled." to {_target}
            if player is not {_target}:
                send "&cDisabled flight for %{_target}%." to player
        else:
            enable flight mode for {_target}
            send "&aFlight enabled." to {_target}
            if player is not {_target}:
                send "&aEnabled flight for %{_target}%." to player

on join:
    if player has permission "fly.persistent":
        enable flight mode for player

get it running

fly-toggle.sk · 20 lines · vanilla Skript
  1. 1

    copy or download

    grab the .sk file with the buttons up top.

    fly-toggle.sk· ready to drop in
  2. 2

    drop it in your scripts folder

    save it exactly here on your server — no typos, just copy the path:

    …/plugins/Skript/scripts/fly-toggle.sk
  3. 3

    reload in-game

    run this in chat or console — your script goes live instantly:

    /sk reload fly-toggle
that's it — your script is live. hop in-game to try it.
/ related templates

more commands templates

comments