Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- prefix: &3&lᴋʙ
- chatc: &f
- chatc2: &b
- on quit:
- if {kb::%player%} is set:
- wait 1 tick
- set {_cnt} to {kb::%player%}
- delete {kb::%player%}
- delete {kblist%{_cnt}%::%player%}
- if {kbstarted.%{_cnt}%} is false:
- if size of {kblist%{_cnt}%::*} = 0:
- set {kb.plct.%{_cnt}%} to false
- if size of {kblist%{_cnt}%::*} < 2:
- set {kbcnt.%{_cnt}%} to false
- if {kbstarted.%{_cnt}%} is true:
- if size of {kblist%{_cnt}%::*} = 1:
- kbwin({_cnt})
- clear player's inventory
- heal player
- feed player
- send "{@prefix} &8» {@chatc2}%player% {@chatc}left the game" to {kblist%{_cnt}%::*} and player
- on join:
- if {kbWins::%uuid of player%} is not set:
- set {kbWins::%uuid of player%} to 0
- if {coins::%uuid of player%} is not set:
- set {coins::%uuid of player%} to 0
- on command "kb":
- if {kb::%player%} is set:
- cancel event
- send "{@prefix} &8» {@chatc}You cannot acces this command ingame"
- on command "spawn":
- if {kb::%player%} is set:
- cancel event
- send "{@prefix} &8» {@chatc}You cannot acces this command ingame"
- command /leave:
- trigger:
- if {kb::%player%} is set:
- wait 1 tick
- set {_cnt} to {kb::%player%}
- delete {kb::%player%}
- delete {kblist%{_cnt}%::%player%}
- if {kbstarted.%{_cnt}%} is false:
- if size of {kblist%{_cnt}%::*} = 0:
- set {kb.plct.%{_cnt}%} to false
- if size of {kblist%{_cnt}%::*} < 2:
- set {kbcnt.%{_cnt}%} to false
- send "{@prefix} &8» {@chatc2}%player% {@chatc}left the game" to {kblist%{_cnt}%::*} and player
- if {kbstarted.%{_cnt}%} is true:
- if size of {kblist%{_cnt}%::*} = 1:
- kbwin({_cnt})
- send title "{@chatc2}You left &3ɢᴀᴍᴇ %{_cnt}%" with subtitle "{@chatc}You have been teleported to the lobby" to player
- teleport player to {kb.lobby}
- heal player
- feed player
- clear player's inventory
- else:
- send "{@prefix} &8» {@chatc}You currently are not in a game"
- command /kb [<text>]:
- trigger:
- if arg-1 is not set:
- kbg(player)
- else:
- send "{@prefix} &8» {@chatc}Just use {@chatc2}/kb"
- function kbg(pl: player):
- set {_kb} to a new chest inventory with 3 rows named "&3&lᴋʙ ɢᴀᴍᴇs"
- set slots (integers from 0 to 26) of {_kb} to light blue stained glass pane named "&7"
- wait 1 tick
- set {_slots} to 9
- set {_counter} to 0
- loop 7 times:
- add 1 to {_counter}
- add 1 to {_slots}
- if {kbstarted.%{_counter}%} is true:
- set slot {_slots} of {_kb} to red stained glass pane named "&3ɢᴀᴍᴇ &b%{_counter}%" with lore "&8&m &r", "&asᴛᴀʀᴛᴇᴅ" and "&7ᴘʟᴀʏᴇʀs: &b%size of {kblist%{_counter}%::*}%"
- else:
- set slot {_slots} of {_kb} to lime stained glass pane named "&3ɢᴀᴍᴇ &b%{_counter}%" with lore "&8&m &r", "&cᴡᴀɪᴛɪɴɢ" and "&7ᴘʟᴀʏᴇʀs: &b%size of {kblist%{_counter}%::*}%"
- if {kbWins::%uuid of {_pl}%} is set:
- set {_wins} to {kbWins::%uuid of {_pl}%}
- if {coins::%uuid of {_pl}%} is set:
- set {_coins} to {coins::%uuid of {_pl}%}
- set slot 4 of {_kb} to skull of ("%{_pl}%" parsed as offline player) named "&3&lᴘʟᴀʏᴇʀ: &b%{_pl}%" with lore "&8&m &r", "&3&lsᴛᴀᴛs:", " &bᴡɪɴs: &f%{_wins}%", " &bᴄᴏɪɴs: &f%{_coins}%", "", "&3&lɪɴғᴏ:", " &7You can buy custom &fᴀʙɪʟɪᴛɪᴇs", " &7with &fᴄᴏɪɴs &7or you can", " &7Buy them at our &f/shop", "" and "&bClick to open your &fᴀʙɪʟɪᴛɪᴇs &bmenu"
- open {_kb} to {_pl}
- function kbabg(pl: player):
- set {_kbabg} to a new chest inventory with 5 rows named "&3&lᴋʙ ᴀʙɪʟɪᴛɪᴇs"
- set slots (integers from 0 to 45) of {_kbabg} to light blue stained glass pane named "&7"
- set slots (integers from 10 to 34) of {_kbabg} to air
- set slot 17, 18, 26 and 27 of {_kbabg} to light blue stained glass pane named "&7"
- set slot 13 of {_kbabg} to anvil named "&f&lsʜᴏᴘ" with lore "&8&m &r", "&bᴄᴏɪɴs: &f%{coins::%uuid of {_pl}%}%", "", "&7You can buy &fᴀʙɪʟɪᴛɪᴇs &7here", "&7With coins you earned ingame", "&7These little feautures" and "&7adds alot of fun into the game"
- set slot 40 of {_kbabg} to red stained glass pane named "&cʙᴀᴄᴋ"
- set {_sl1} to 19
- loop 5 times:
- add 1 to {_sl1}
- add 1 to {_cnt}
- set slot {_sl1} of {_kbabg} to white stained glass pane named "&3&lsʟᴏᴛ &b%{_cnt}%" with lore "", "&8This slot is currently empty", "&7You can buy custom &fᴀʙɪʟɪᴛɪᴇs", "&7with &fᴄᴏɪɴs &7or you can" and "&7Buy them at our &f/shop", "" and "&bᴄʟɪᴄᴋ ᴛᴏ sᴇʟᴇᴄᴛ ᴀɴ ɪᴛᴇᴍ"
- set {_sl} to 19
- set {_slc} to 0
- loop 5 times:
- add 1 to {_sl}
- add 1 to {_slc}
- if {kbabl.%{_slc}%.%{_pl}%} is set:
- set slot {_sl} of {_pl}'s inventory to {kbabl.%{_slc}%.%{_pl}%}
- open {_kbabg} to {_pl}
- function kbshop(pl: player):
- set {_kbshop} to a new chest inventory with 5 rows named "&3&lᴋʙ sʜᴏᴘ"
- set slots (integers from 0 to 45) of {_kbshop} to light blue stained glass pane named "&7"
- set slots (integers from 10 to 34) of {_kbshop} to air
- set slot 17, 18, 26 and 27 of {_kbshop} to light blue stained glass pane named "&7"
- set slot 40 of {_kbshop} to red stained glass pane named "&cʙᴀᴄᴋ"
- open {_kbshop} to {_pl}
- function kbabs(pl: player, ct: integer):
- set {_kbabs} to a new chest inventory with 5 rows named "&3&lᴋʙ sʟᴏᴛ: &b%{_ct}%"
- set slots (integers from 0 to 45) of {_kbabs} to light blue stained glass pane named "&7"
- set slots (integers from 10 to 34) of {_kbabs} to air
- set slot 17, 18, 26 and 27 of {_kbabs} to light blue stained glass pane named "&7"
- set slot 40 of {_kbabs} to red stained glass pane named "&cʙᴀᴄᴋ"
- open {_kbabs} to {_pl}
- function kb(pl: player, ct: integer):
- if {kb::%{_pl}%} is not set:
- set {kb::%{_pl}%} to {_ct}
- set {kblist%{_ct}%::%{_pl}%} to {_pl}
- set {kbcnt.%{_ct}%} to false
- apply slowness 2 without particles to {_pl} for 4 seconds
- apply blindness 2 without particles to {_pl} for 4 seconds
- teleport {_pl} to {kbSpw.%{_ct}%}
- clear {_pl}'s inventory
- set slots (integers from 3 to 7) of {_pl}'s inventory to white stained glass pane named "&f&lɴᴏɴᴇ" with lore "", "&7You can buy custom &fᴀʙɪʟɪᴛɪᴇs", "&7with &fᴄᴏɪɴs &7or you can" and "&7Buy them at our &f/shop"
- set slot 1 of {_pl}'s inventory to stick of knockback 3 with all flags hidden named "&a&lsʟᴀᴘ ᴍᴀᴄʜɪɴᴇ" with lore "", "&7Goodluck clapping people" and "&7More fun coming soon ;)"
- set slot 9 of {_pl}'s inventory to arrow with all flags hidden named "&7"
- set {_sl} to 2
- loop 5 times:
- add 1 to {_slc}
- add 1 to {_sl}
- if {kbabl.%{_slc}%.%{_pl}%} is set:
- set slot {_sl} of {_pl}'s inventory to {kbabl.%{_slc}%.%{_pl}%}
- send "{@prefix} &8» {@chatc2}%{_pl}% {@chatc}joined the game" to {kblist%{_ct}%::*}
- send title "{@chatc2}You joined &3ɢᴀᴍᴇ %{_ct}%" with subtitle "{@chatc}current players {@chatc2}%size of {kblist%{_ct}%::*}%" to {_pl}
- if {kb.plct.%{_ct}%} is false:
- set {kb.plct.%{_ct}%} to true
- while {kb.plct.%{_ct}%} is true:
- send action bar "&3ᴄᴜʀʀᴇɴᴛ ᴘʟᴀʏᴇʀs: &b%size of {kblist%{_ct}%::*}%" to {kblist%{_ct}%::*}
- wait 1 second
- if size of {kblist%{_ct}%::*} >= 2:
- set {kb.plct.%{_ct}%} to false
- kbstart({_ct})
- function kbwin(gm: integer):
- set {kbstarted%{_gm}%} to false
- delete {kblist%{_gm}%::*}
- delete {kb::%{kblist%{_gm}%::*}%}
- add 1 to {kbWins::%uuid of {kblist%{_gm}%::*}%}
- teleport {kblist%{_gm}%::*} to {kb.lobby}
- send title "{@chatc2}You won &3ɢᴀᴍᴇ %{_gm}%" with subtitle "{@chatc}Goodjob ;)" to {kblist%{_gm}%::*}
- apply slowness 2 without particles to {kblist%{_gm}%::*} for 4 seconds
- apply blindness 2 without particles to {kblist%{_gm}%::*} for 4 seconds
- broadcast "&3&m "
- broadcast ""
- broadcast "&b%{kblist%{_gm}%::*}% &fJust won &bGame %{_gm}% &fin kb"
- broadcast ""
- broadcast "&3&m "
- function kbstart(gm: integer):
- if {kbcnt.%{_gm}%} is false:
- set {kbcnt.%{_gm}%} to true
- set {kb.count.%{_gm}%} to 6
- while {kbcnt.%{_gm}%} is true:
- remove 1 from {kb.count.%{_gm}%}
- send title "{@prefix} starting in.." with subtitle "{@chatc2}%{kb.count.%{_gm}%}%" to {kblist%{_gm}%::*}
- if {kb.count.%{_gm}%} = 0:
- set {kbcnt.%{_gm}%} to false
- send title "{@prefix} started" with subtitle "{@chatc2}Goodluck" to {kblist%{_gm}%::*}
- set {kbstarted.%{_gm}%} to true
- wait 1 second
- function inv(pl: player, sl: integer, ct: integer):
- if {kbSpw.%{_ct}%} is set:
- if {kb.lobby} is set:
- if lore of slot {_sl} of {_pl}'s current inventory contains "&cᴡᴀɪᴛɪɴɢ":
- kb({_pl}, {_ct})
- else:
- send "{@prefix} &8» {@chatc}This game is already started" to {_pl}
- else:
- send "{@prefix} &8» {@chatc}Contact the staff team to setup the lobby" to {_pl}
- else:
- send "{@prefix} &8» {@chatc}Contact the staff team to set the spawn for this game" to {_pl}
- close {_pl}'s inventory
- command /kbset [<text>] [<integer>]:
- permission: kb.set
- trigger:
- if arg-1 is "spawn":
- if arg-2 is set:
- set {kbSpw.%arg-2%} to player's position
- set yaw of {kbSpw.%arg-2%} to player's yaw
- set pitch of {kbSpw.%arg-2%} to player's pitch
- send "{@prefix} &8» {@chatc}The spawn for {@chatc2}Game %arg-2% {@chatc}has been set"
- else:
- send "{@prefix} &8» {@chatc}Make sure to select a game between 1-7"
- if arg-1 is "lobby":
- set {kb.lobby} to player's position
- set yaw of {kb.lobby} to player's yaw
- set pitch of {kb.lobby} to player's pitch
- send "{@prefix} &8» {@chatc}The {@chatc2}Lobby {@chatc}has been set"
- if arg-1 is not set:
- send "{@prefix} &8» {@chatc}Specify what you want to set"
- on tab complete of "/kbset":
- set tab completions for position 1 to "spawn" and "lobby"
- if tab arg-1 = "spawn":
- set tab completions for position 2 to 1, 2, 3, 4, 5, 6 and 7
- command /kbunset [<text>] [<integer>]:
- permission: kb.set
- trigger:
- if arg-1 is "spawn":
- if arg-2 is set:
- delete {kbSpw.%arg-2%}
- send "{@prefix} &8» {@chatc}The spawn for {@chatc2}Game %arg-2% {@chatc}has been unset"
- else:
- send "{@prefix} &8» {@chatc}Make sure to select a game between 1-7"
- if arg-1 is "lobby":
- delete {kb.lobby}
- send "{@prefix} &8» {@chatc}The {@chatc2}Lobby {@chatc}has been unset"
- if arg-1 is not set:
- send "{@prefix} &8» {@chatc}Specify what you want to set"
- on tab complete of "/kbunset":
- set tab completions for position 1 to "spawn" and "lobby"
- if tab arg-1 = "spawn":
- set tab completions for position 2 to 1, 2, 3, 4, 5, 6 and 7
- on death:
- if {kb::%victim%} is set:
- cancel event
- wait 1 tick
- set {_nmb} to {kb::%victim%}
- delete {kb::%victim%}
- delete {kblist%{_nmb}%::%victim%}
- apply slowness 2 without particles to victim for 4 seconds
- apply blindness 2 without particles to victim for 4 seconds
- teleport victim to {kb.lobby}
- send title "{@chatc2}You died" with subtitle "{@chatc}You have been teleported to the lobby" to victim
- clear victim's inventory
- heal victim
- feed victim
- if {kbstarted.%{_nmb}%} is false:
- if size of {kblist%{_nmb}%::*} = 0:
- set {kb.plct.%{_nmb}%} to false
- if size of {kblist%{_nmb}%::*} < 2:
- set {kbcnt.%{_nmb}%} to false
- if {kbstarted.%{_nmb}%} is true:
- if size of {kblist%{_nmb}%::*} = 1:
- kbwin({_nmb})
- on drop:
- if {kb::%player%} is set:
- cancel event
- on inventory click:
- if name of event-inventory contains "&3&lᴋʙ ɢᴀᴍᴇs":
- cancel event
- if index of event-slot = 10:
- inv(player, 10, 1)
- if index of event-slot = 11:
- inv(player, 11, 2)
- if index of event-slot = 12:
- inv(player, 12, 3)
- if index of event-slot = 13:
- inv(player, 13, 4)
- if index of event-slot = 14:
- inv(player, 14, 5)
- if index of event-slot = 15:
- inv(player, 15, 6)
- if index of event-slot = 16:
- inv(player, 16, 7)
- if index of event-slot = 4:
- kbabg(player)
- if name of event-inventory contains "&3&lᴋʙ ᴀʙɪʟɪᴛɪᴇs":
- cancel event
- if index of event-slot = 40:
- kbg(player)
- if index of event-slot = 13:
- kbshop(player)
- if index of event-slot = 20:
- kbabs(player, 1)
- if index of event-slot = 21:
- kbabs(player, 2)
- if index of event-slot = 22:
- kbabs(player, 3)
- if index of event-slot = 23:
- kbabs(player, 4)
- if index of event-slot = 24:
- kbabs(player, 5)
- if name of event-inventory contains "&3&lᴋʙ sʟᴏᴛ":
- cancel event
- if index of event-slot = 40:
- kbabg(player)
- if name of event-inventory contains "&3&lᴋʙ sʜᴏᴘ":
- cancel event
- if index of event-slot = 40:
- kbabg(player)
- on place of white glass pane:
- if {kb::%player%} is set:
- cancel event
- on inventory click:
- if {kb::%player%} is set:
- if event-inventory is player's inventory:
- cancel event
Add Comment
Please, Sign In to add comment