Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- park: &f[&cParkour&f]: &7
- variables:
- {parkourj.%player%} = false
- on unload:
- loop all players:
- if {parkourj.%loop-player%} is true:
- execute loop-player command "/parkour leave"
- command /parkour [<text>] [<text>] [<text>]:
- trigger:
- if arg 1 isn't set:
- send "{@park}Commands: &c/parkour help"
- if arg 1 is "help":
- message "{@park}/parkour join [arena]"
- message "{@park}/parkour leave"
- message "{@park}/parkour list"
- message "{@park}/parkour top [arena]"
- message "{@park}/parkour ptop [arena]"
- if player is op:
- message "{@park}/parkour create [arena]"
- message "{@park}/parkour remove [arena]"
- message "{@park}/parkour set spawn [arena]"
- if arg 1 is "list":
- size of {parkourarena::*} = 0:
- send "{@park}No arena."
- size of {parkourarena::*} > 0:
- send "&6--------&7Arenas&6--------"
- loop {parkourarena::*}:
- send "&a &7- &a%loop-value% &7-"
- if arg 1 is "create":
- if player is op:
- if arg 2 is set:
- {parkourarena::*} contains arg 2:
- send "{@park}There is already an arena with the same name!"
- else:
- set {parkourarena::%arg 2%} to arg 2
- send "{@park}%arg 2% succesfully created."
- else:
- send "{@park}Select the arena name."
- else:
- send "{@park}You don't have permission."
- if arg 1 is "remove":
- if player is op:
- if arg 2 is set:
- if {parkourarena::%arg 2%} is set:
- delete {parkourarena::%arg 2%}
- delete {parkourspawn.%arg 2%}
- send "{@park}%arg 2% deleted."
- else:
- send "{@park}Arena not found"
- else:
- send "{@park}Select the arena name."
- else:
- send "{@park}You don't have permission."
- if arg 1 is "set":
- if player is op:
- if arg 2 isn't set:
- send "{@park}/parkour set spawn [arena]"
- else:
- if arg 3 isn't set:
- send "{@park}Select the arena name."
- else:
- if {parkourarena::%arg 3%} isn't set:
- send "{@park}Arena not found"
- else:
- if arg 2 is "spawn":
- set {parkourspawn.%arg 3%} to location of player
- send "{@park}Spawn set for %arg 3% to %location of player%."
- else:
- send "{@park}You don't have permission."
- if arg 1 is "reset":
- if player is op:
- if arg 2 is not set:
- message "{@park}Usage: /parkour reset [arena] [player]"
- else:
- if arg 3 is not set:
- message "{@park}Usage: /parkour reset [arena] [player]"
- else:
- if {parkourarena::%arg 2%} isn't set:
- send "{@park}Arena not found."
- else:
- if {parki.%arg-2%::%arg-3%} is not set:
- message "{@park}%arg-3%'s time is not set on %arg-2%"
- else:
- loop {parki.%arg-2%::*}:
- if loop-index is arg-3:
- remove loop-index from {parki.%arg-2%::*}
- remove loop-value from {parki.%arg-2%::*}
- clear {parkour.%arg-2%.%arg-3%.highscore}
- message "{@park}%arg-3%'s time has been removed from %arg-2%."
- if arg 1 is "join":
- if arg 2 isn't set:
- if size of {parkourarena::*} = 0:
- send "{@park}No arena."
- else:
- open chest with 6 rows named "&8Parkour Arenas" to player
- clear {parkarena.amount}
- loop {parkourarena::*}:
- add 1 to {parkarena.amount}
- set slot {parkarena.amount}-1 of player's current inventory to sand named "%loop-value%" with lore "&e&oYour Best Time: &c%{parkour.%loop-value%.%player%.highscore}% ||&7 - &a&oClick to join &7 -"
- else:
- if {parkourj.%player%} is true:
- send "{@park}You have already joined to the game."
- else:
- if {parkourarena::%arg 2%} isn't set:
- send "{@park}Arena not found"
- else:
- if {parkourspawn.%arg 2%} is not set:
- message "{@park}The spawn is not set for %arg 2%!"
- else:
- set {parkourlastloc.%player%} to player's location
- wait 1 tick
- teleport player to {parkourspawn.%arg 2%}
- set {jelenlegpalya.%player%} to arg-2
- send "{@park}You joined to the game!"
- set {parkourj.%player%} to true
- set {parkourslimetp.%player%} to {parkourspawn.%arg 2%}
- add 1 slimeball named "&b&lTeleport to the start" to the player's inventory
- effectp(player)
- if arg 1 is "leave":
- if {parkourj.%player%} is true:
- set {parkourj.%player%} to false
- teleport player 1 above {parkourlastloc.%player%}
- message "{@park}You left the game."
- remove all slimeball from player's inventory
- set {timer.%player%} to false
- else:
- message "{@park}You are not in the game."
- if arg 1 is "ptop":
- if arg 2 is not set:
- message "{@park}Select the arena name."
- else:
- if {parkourarena::%arg 2%} isn't set:
- send "{@park}Arena not found"
- else:
- message "{@park}Your best on %arg-2%: %{parkour.%arg-2%.%player%.highscore}%"
- if arg 1 is "top":
- if arg 2 is not set:
- message "{@park}Select the arena name."
- else:
- if {parkourarena::%arg 2%} isn't set:
- send "{@park}Arena not found"
- else:
- loop {parki.%arg-2%::*}:
- add 1 to {_size}
- if {_low.to.high::%loop-value%} is not set:
- set {_low.to.high::%loop-value%} to loop-index
- else:
- set {_n} to 0
- loop {_size} times:
- set {_n} to {_n}+1
- {_low.to.high::%loop-value-1%.%{_n}%} is not set
- set {_low.to.high::%loop-value-1%.%{_n}%} to loop-index
- stop loop
- wait 1 tick
- send "&8--- &aBest 5 players on %arg 2% &8---"
- loop {_low.to.high::*}:
- add 1 to {_result}
- send "&c%loop-value% : &e%{parki.%arg-2%::%loop-value%}%"
- if {_result} is 5:
- stop
- function effectp(p: player):
- remove speed from {_p}
- remove jump boost from {_p}
- remove invisibility from {_p}
- set {_p}'s fly mode to false
- on step on diamond block:
- if {parkourj.%player%} is true:
- set {timer.%player%} to true
- set {start.%player%} to now
- while {timer.%player%} is true:
- set {diff.%player%} to difference between now and {start.%player%}
- show an action bar from "&6&lTime: &b&l%{diff.%player%}%" to player
- wait 1 tick
- on step on iron block:
- if {parkourj.%player%} is true:
- if {timer.%player%} is true:
- set {timer.%player%} to false
- if {parkour.%{jelenlegpalya.%player%}%.%player%.highscore} is not set:
- set {parkour.%{jelenlegpalya.%player%}%.%player%.highscore} to {diff.%player%}
- message "{@park}Personal time set."
- set {parki.%{jelenlegpalya.%player%}%::%name of player%} to {diff.%player%}
- else:
- if {diff.%player%} < {parkour.%{jelenlegpalya.%player%}%.%player%.highscore}:
- set {parkour.%{jelenlegpalya.%player%}%.%player%.highscore} to {diff.%player%}
- message "{@park}New personal best!"
- set {parki.%{jelenlegpalya.%player%}%::%name of player%} to {diff.%player%}
- set {timer.%player%} to false
- execute player command "/parkour leave"
- message "{@park}You have succesfully finished the map!"
- else:
- execute player command "/parkour leave"
- message "{@park}You have succesfully finished the map, but the timer wasn't started, because you didn't stepped on the diamond block."
- on rightclick with slimeball:
- if {parkourj.%player%} is true:
- if name of player's tool is "&b&lTeleport to the start":
- teleport player to {parkourslimetp.%player%}
- set {timer.%player%} to false
- on sign change:
- if player is op:
- if line 1 is "[parkour]":
- if line 2 is "join":
- set line 1 to "&c&l[&8&lParkour&c&l]"
- set line 2 to "&1&lJoin"
- if line 2 is "leave":
- set line 1 to "&c&l[&8&lParkour&c&l]"
- set line 2 to "&1&lLeave"
- on click on sign:
- if line 1 is "&c&l[&8&lParkour&c&l]":
- if line 2 is "&1&lJoin":
- make player execute "/parkour join"
- if line 2 is "&1&lLeave":
- make player execute "/parkour leave"
- on command:
- if {parkourj.%player%} is true:
- if command is not "parkour":
- message "{@park}You can't use commands ingame!"
- cancel event
- on inventory click:
- if name of player's current inventory is "&8Parkour Arenas":
- loop {parkourarena::*}:
- if name of clicked item is equal to loop-value:
- execute playe r command "/parkour join %loop-value%"
- cancel event
- on quit:
- execute player command "/parkour leave"
- on drop:
- if {parkourj.%player%} is true:
- cancel event
- on inventory click:
- if {parkourj.%player%} is true:
- cancel event
- on break:
- if {parkourj.%player%} is true:
- cancel event
- on place:
- if {parkourj.%player%} is true:
- cancel event
- on food level change:
- if {parkourj.%player%} is true:
- cancel event
- on damage:
- if {parkourj.%victim%} is true:
- cancel event
- on right click:
- if targeted block is pink stained glass:
- broadcast "&c&l%player% Finished the parkour"
- give player 2 Nether Star
- kill player
Advertisement
Add Comment
Please, Sign In to add comment