#-------------------------------------# # Skript made by: # # HimahoYT # #-------------------------------------# #---------------# # CONFIGURATION # #---------------# options: #Skript Name Skript: CCG Parkour #Dont change this and the name of the file #Skript Version Version: 1.0 #Aliases Aliases: /pk #Style Prefix: &9&lCCG Parkour &7► HelpTitle: &6&lPARKOUR #Perms AdminPerm: parkour.admin #Enabled World World: world #Messages NoPermMSG: &cYou dont have permission to do this. #Pressure Plates StartPlate: heavy weighted pressure plate EndPlate: light weighted pressure plate #Fall coordinate: Y - Coordinate FCoordinate: 10 #---------------------------------------------------------# # DO NOT TOUCH THE CODE UNLESS YOU KNOW WHAT YOU'RE DOING # #---------------------------------------------------------# variables: {time.seconds.%player%} = 0 command /parkour [] []: Aliases: {@Aliases} trigger: if arg-1 is not set: player have permission "{@AdminPerm}": send "&7&l&m--------------------=[&r {@HelpTitle} &7&l&m]=---------------------" send "" send "&a/parkour set start &7Set the start location" send "&a/parkour set end &7Set the end location" send "&a/parkour remove start &7Remove the start location" send "&a/parkour remove end &7Remve the end location" send "" send "&a/parkour reload &7Reload the skript" send "" send "&7&l&m-----------------------------------------------------" else: send "{@Prefix} {@NoPermMSG}" if arg-1 is "set": world is "{@World}": player have permission "{@AdminPerm}": if arg-2 is not set: send "&7&l&m--------------------=[&r {@HelpTitle} &7&l&m]=---------------------" send "" send "&a/parkour set start &7Set the start location" send "&a/parkour set end &7Set the end location" send "" send "&7&l&m-----------------------------------------------------" if arg-2 is not "start" or "end": send "&7&l&m--------------------=[&r {@HelpTitle} &7&l&m]=---------------------" send "" send "&a/parkour set start &7Set the start location" send "&a/parkour set end &7Set the end location" send "&a/parkour remove start &7Remove the start location" send "&a/parkour remove end &7Remve the end location" send "" send "&a/parkour reset &7Reset stats of player" send "" send "&7&l&m-----------------------------------------------------" if arg-2 is "start", "end" or "reset": if arg-2 is "start": if targeted block is a {@StartPlate}: if {startplate.location} is set: send "{@Prefix} &cThe start plate is already created in this location." stop else: if {startplate.created} is not set: set {startplate.location} to location of player's targeted block send "{@Prefix} &aYou set the start plate location." set {startplate.created} to true stop else: send "{@Prefix} &c&cStart plate is already created, remove it to set in other location." else: send "{@Prefix} &cThe block is not a {@StartPlate}." if arg-2 is "end": if targeted block is a {@EndPlate}: if {endplate.location} is set: send "{@Prefix} &cThe end plate is already created in this location." stop else: if {endplate.created} is not set: set {endplate.location} to location of player's targeted block send "{@Prefix} &aYou set the end plate location." set {endplate.created} to true stop else: send "{@Prefix} &cEnd plate is already created, remove it to set in other location." else: send "{@Prefix} &cThe block is not a {@EndPlate}." if arg-2 is "reset": set {pk.resetloc} to player's location send "{@Prefix} &aYou set the reset location." stop else: send "{@Prefix} {@NoPermMSG}" if arg-1 is "remove": world is "{@World}": player have permission "{@AdminPerm}": if arg-2 is not set: send "&7&l&m--------------------=[&r {@HelpTitle} &7&l&m]=---------------------" send "" send "&a/parkour remove start &7Remove the start location" send "&a/parkour remove end &7Remve the end location" send "" send "&7&l&m-----------------------------------------------------" if arg-2 is not "start" or "end": send "&7&l&m--------------------=[&r {@HelpTitle} &7&l&m]=---------------------" send "" send "&a/parkour set start &7Set the start location" send "&a/parkour set end &7Set the end location" send "&a/parkour remove start &7Remove the start location" send "&a/parkour remove end &7Remve the end location" send "" send "&a/parkour reset &7Reset stats of player" send "" send "&7&l&m-----------------------------------------------------" if arg-2 is "start" or "end": if arg-2 is "start": if targeted block is a {@StartPlate}: if {startplate.location} is not set: send "{@Prefix} &cThe start plate is not set in this location." stop else: delete {startplate.location} send "{@Prefix} &aYou remove the start plate location." delete {startplate.created} stop else: send "{@Prefix} &cThe block is not a {@StartPlate}." if arg-2 is "end": if targeted block is a {@EndPlate}: if {endplate.location} is not set: send "{@Prefix} &cThe end plate is not set in this location." stop else: delete {endplate.location} send "{@Prefix} &aYou remove the end plate location." delete {endplate.created} stop else: send "{@Prefix} &cThe block is not a {@EndPlate}." else: send "{@Prefix} {@NoPermMSG}" if arg-1 is "reload": player have permission "{@AdminPerm}": execute console command "sk reload {@Skript}" send "{@Prefix} &aSkript reloaded" else: send "{@Prefix} {@NoPermMSG}" on break: if event-block is a {@StartPlate}: if {startplate.location} is set: player have permission "{@AdminPerm}": cancel event send "{@Prefix} &cUse, &6/parkour remove start &cto remove it." else: cancel event delete {startplate.location} else: cancel event stop if event-block is a {@EndPlate}: if {endplate.location} is set: player have permission "{@AdminPerm}": cancel event send "{@Prefix} &cUse, &6/parkour remove end &cto remove it." else: cancel event else: cancel event stop on first join: set {time.seconds.%player%} to 0 on pressure plate: if {started.%player%} is not set: cancel event set {started.%player%} to false if {started.%player%} is false: if {startplate.location} is event-location: send "&aStarted parkour! Get to the end as quick as posible." to player make player execute command "/p-start" set action bar of player to "&e&lCurrent Time: &60 seconds" else: {startplate.location} is event-location: cancel event stop on pressure plate: if {started.%player%} is true: {endplate.location} is event-location: send "&6You completed the parkour in &d%{time.seconds.%player%}% seconds." set {started.%player%} to false make player execute command "/p-end" launch burst firework colored green at player timed 1 wait 1 seconds set action bar of player to "" stop else: {endplate.location} is event-location: cancel event stop every 1 seconds: loop all players: if {started.%loop-player%} is true: if {time.seconds.%loop-player%} is set: add 1 to {time.seconds.%loop-player%} set action bar of loop-player to "&e&lCurrent Time: &6%{time.seconds.%loop-player%}% seconds" on any movement: world is "{@World}": if y-coordinate of player is less than {@FCoordinate}: if {pk.resetloc} is set: if {started.%player%} is true: wait 1 tick teleport player to {pk.resetloc} make player execute command "/p-end" set {started.%player%} to false else: teleport player to spawn else: teleport player to spawn command /p-start: trigger: set {_count} to 0 loop 36 times: set {inventory.%player%.%{_count}%} to slot {_count} of player's inventory set slot {_count} of player's inventory to air add 1 to {_count} wait 2 ticks set slot 4 of player to stained hardened clay:14 named "&c&lReset Parkour" with lore "&7Right click to reset parkour" set {started.%player%} to true set {time.seconds.%player%} to 0 command /p-end: trigger: if {started.%player%} is true: set {_count} to 0 loop 36 times: set slot {_count} of player's inventory to {inventory.%player%.%{_count}%} add 1 to {_count} on right click: world is "{@World}": player is holding a stained hardened clay:14 named "&c&lReset Parkour" with lore "&7Right click to reset parkour": cancel event make player execute command "/p-end" set {started.%player%} to false teleport player to {pk.resetloc} wait 1 seconds set action bar of player to "" stop on load: send "&b&l&m------------------------------" to console send "" to console send " &9&lCCG Parkour" to console send " &7>> &aEnabled" to console send "" to console send "&b&l&m------------------------------" to console