Jump to content

Better Elytra/"Shift to Boost" Skript


Recommended Posts

This is a small, compact Skript that is designed for servers where elytra are widely used as a substitute for fireworks. While gliding, players are shown a boost meter labeled "Afterburner" on the action bar, and when one presses Shift while gliding, their velocity will increase smoothly. The maximum speed achievable with this Skript is extremely high compared to firework boosting.

With the values in this Skript, a full charge of the Afterburner will last 3 seconds, and a full recharge requires 12 seconds. Players must release the Shift key for the Afterburner to recharge. This is intentional. The mechanics of the Skript include audio feedback when pressing Shift and when the boost runs out. I am aware that this implementation is less responsive to sharp turns than fireworks. This is also intentional, the slow turn response feels more realistic/"plane-like" than using fireworks.

This is configured to show the Afterburner meter only when gliding. In an elytra-centric server, you may want to make it always show.

Edit: I failed to mention that if a player is using the NoFall hack, this will be broken for them. If it works for most players, you can use a complaint that it doesn't work as an indication that a player is using cheats.

sneak toggle:
  player is not sneaking
  player's gliding is true
  metadata "afterburner" of player is greater or equal to 1:
    play sound "entity.ender_dragon.flap" to player
every 2 ticks:
  loop all players where [input does not have metadata "afterburner"]:
    set metadata "afterburner" of loop-player to 30
  loop all players where [input is not sneaking]:
    metadata "afterburner" of loop-player is less than 30
    set metadata "afterburner" of loop-player to metadata "afterburner" of loop-player + 0.25
  loop all players where [gliding of input is true]:
    loop-player is sneaking:
      metadata "afterburner" of loop-player is greater or equal to 1
      add 0.2 to vector length of loop-player's velocity
      set metadata "afterburner" of loop-player to metadata "afterburner" of loop-player - 1
      metadata value "afterburner" of loop-player is less than 1
      play sound "block.beacon.deactivate" to loop-player
    send action bar "Afterburner: [%first 2+rounded down (metadata ""afterburner"" of loop-player / 2) characters of ""&a|||||||||||||||""%%the first 17-rounded down (metadata ""afterburner"" of loop-player / 2) characters of ""&c|||||||||||||||""%&f]" to loop-player


Edited by EnderEyeGames
  • Thanks 1
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...