Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #0.0.6
- options:
- prefix: THE PIT -
- #Settings
- bungeecord: false
- #Citizen Id.(found in /npc list)
- shop-id: 0
- upgrade-id: 1
- #Messages
- chat: true
- chatformat: &7[&e%{pit.%uuid of player%.level}%&7] %colored player's prefix% %player% &8&l- &7%message%
- kill-msg: &a&lKILL! &7on [&e%{pit.%uuid of victim%.level}%&7] %victim's displayname% &b&l+15XP &6&l+10
- kill-streak-msg: &c&lSTREAK! &7of &c%{pit.%uuid of attacker%.streak}% &7by [&e%{pit.%uuid of attacker%.level}%&7] %attacker's displayname%
- level-up: &3&lLEVEL UP! &7[&e%{pit.%{_uuid}%.level}%&7]
- item-purchase: &a&lPURCHASE! &6%{_item}%
- perk-purchase: &a&lPURCHASED PERK!
- perk-selected: &c&lSELECTED PERK
- no-gold: &c&lNOT ENOUGHT GOLD!
- in-game: &7You are in game.
- not-in-game: &7You are not in game.
- #Titles
- level-up-title: &b&lLEVEL UP!
- level-up-subtitle: &7[&e%{_old}%&7] &3&l-> &7[&e%{pit.%{_uuid}%.level}%&7]
- death-title: &c&lYOU DIED
- death-subtitle: &e
- function pit_join(p: player):
- set {_uuid} to uuid of {_p}
- set {pit.%{_uuid}%.state} to "ingame"
- teleport {_p} to {pit.spawn}
- if {pit.%{_uuid}%.level} is not set:
- set {pit.%{_uuid}%.level} to 1
- if {pit.%{_uuid}%.xp} is not set:
- set {pit.%{_uuid}%.xp} to 0
- if {pit.%{_uuid}%.xp-need} is not set:
- set {pit.%{_uuid}%.xp-need} to 100
- if {pit.%{_uuid}%.gold} is not set:
- set {pit.%{_uuid}%.gold} to 0
- set {pit.%{_uuid}%.streak} to 0
- set {pit.%{_uuid}%.status} to "&aIdling"
- pit_updatetag( {_p})
- pit_equip( {_p})
- function pit_leave(p: player):
- set {_uuid} to uuid of {_p}
- clear {_p}'s inventory
- delete stylish scoreboard "PIT-%{_p}%"
- delete {pit.%{_uuid}%.streak}
- delete {pit.%{_uuid}%.state}
- make console execute command "nte player %{_p}% clear"
- teleport {_p} to {pit.leave}
- on join:
- if {@bungeecord} is true:
- pit_join(player)
- stop
- else:
- stop
- command /pit [<text>]:
- trigger:
- if arg-1 is "join":
- if {pit.%uuid of player%.state} is not set:
- pit_join(player)
- stop
- else:
- send "{@prefix} {@in-game}"
- stop
- if arg-1 is "leave":
- if {@bungeecord} is false:
- if {pit.%uuid of player%.state} is "ingame":
- pit_leave(player)
- stop
- else:
- send "{@prefix} {@not-in-game}"
- stop
- else:
- stop
- if arg-1 is "setspawn":
- if player has permission "PIT.ADMIN":
- set {pit.spawn} to player's location
- send "{@prefix} &7Spawn Set"
- stop
- if arg-1 is "setleave":
- if player has permission "PIT.ADMIN":
- set {pit.leave} to player's location
- send "{@prefix} &7Leave point Set"
- stop
- else:
- send "{@prefix} &3&l> &7JOIN"
- send "{@prefix} &3&l> &7LEAVE"
- if player has permission "PIT.ADMIN":
- send "{@prefix} &3&l> &7SETSPAWN"
- send "{@prefix} &3&l> &7SETLEAVE"
- stop
- else:
- stop
- on quit:
- pit_leave(player)
- stop
- on chat:
- if {pit.%uuid of player%.state} is "ingame":
- if {@chat} is true:
- cancel event
- broadcast "{@chatformat}"
- else:
- stop
- else:
- stop
- on pressure plate:
- if {pit.%uuid of player%.state} is "ingame":
- cancel event
- push the player upwards at speed 0.4
- push the player forwards at speed 1.2
- else:
- stop
- every second:
- loop all players:
- if {pit.%uuid of loop-player%.state} is "ingame":
- if stylish scoreboard "PIT-%loop-player%" does not exist:
- create new stylish scoreboard named "PIT-%loop-player%"
- loop 10 times:
- create a new id based score "PIT-%loop-player%Slot%loop-number%" with text "&%loop-number%" slot loop-number for stylish scoreboard "PIT-%loop-player%"
- set {_need} to {pit.%uuid of loop-player%.xp-need}-{pit.%uuid of loop-player%.xp}
- set stylish scoreboard of loop-player to "PIT-%loop-player%"
- set title of stylish scoreboard "PIT-%loop-player%" to "&e&lTHE PIT"
- set the text of id "PIT-%loop-player%Slot10" to "&7%now%"
- set the text of id "PIT-%loop-player%Slot9" to "&1&e"
- set the text of id "PIT-%loop-player%Slot8" to "&7Level &7[&e%{pit.%uuid of loop-player%.level}%&7]"
- set the text of id "PIT-%loop-player%Slot7" to "&7Needed XP: &b%{_need}%"
- set the text of id "PIT-%loop-player%Slot6" to "&2&9"
- set the text of id "PIT-%loop-player%Slot5" to "&7Gold: &6&l%{pit.%uuid of loop-player%.gold}%"
- set the text of id "PIT-%loop-player%Slot4" to "&3&9"
- set the text of id "PIT-%loop-player%Slot3" to "&7Status: %{pit.%uuid of loop-player%.status}%"
- set the text of id "PIT-%loop-player%Slot2" to "&4&9"
- set the text of id "PIT-%loop-player%Slot1" to "&eMC.SERVER.ORG"
- on damage of player:
- if {pit.%uuid of victim%.state} is "ingame":
- if damage cause is fall:
- cancel event
- if damage cause is void:
- damage victim by 20
- if attacker is player:
- wait 1 tick
- loop 20 times:
- set {_health.%loop-integer%.%victim%} to "&7❤"
- loop-integer is greater than max health of victim
- set {_health.%loop-integer%.%victim%} to ""
- loop rounded health of victim times:
- set {_health.%loop-integer%.%victim%} to "&4❤"
- show an action bar from "%{_health.1.%victim%}%%{_health.2.%victim%}%%{_health.3.%victim%}%%{_health.4.%victim%}%%{_health.5.%victim%}%%{_health.6.%victim%}%%{_health.7.%victim%}%%{_health.8.%victim%}%%{_health.9.%victim%}%%{_health.10.%victim%}%%{_health.11.%victim%}%%{_health.12.%victim%}%%{_health.13.%victim%}%%{_health.14.%victim%}%%{_health.15.%victim%}%%{_health.16.%victim%}%%{_health.17.%victim%}%%{_health.18.%victim%}%%{_health.19.%victim%}%%{_health.20.%victim%}%" to attacker
- set {pit.%uuid of victim%.status} to "&cFighting"
- set {pit.%uuid of attacker%.status} to "&cFighting"
- else:
- stop
- function pit_give_gp(p: player):
- loop all items in {_p}'s inventory:
- if loop-item is golden_apple:
- stop
- set {_uuid} to uuid of {_p}
- if {pit.%{_uuid}%.perk::golden-heads} = true:
- give 1 golden_apple named "&6Golden Head" to {_p}
- else:
- give 1 golden_apple to {_p}
- on death of player:
- if {pit.%uuid of victim%.state} is "ingame":
- set death message to ""
- teleport victim to {pit.spawn}
- clear drops
- add 1 to {pit.%uuid of attacker%.streak}
- add 10 to {pit.%uuid of attacker%.gold}
- add 15 to {pit.%uuid of attacker%.xp}
- set {pit.%uuid of victim%.streak} to 0
- if {pit.%uuid of attacker%.streak} = 5 or 10 or 15 or 25 or 30 or 35 or 40 or 45 or 50:
- loop all players in attacker's world:
- if {pit.%uuid of loop-player%.state} is "ingame":
- send"{@prefix} {@kill-streak-msg}" to loop-player
- send "{@prefix} {@kill-msg}" to attacker
- pit_give_gp(attacker)
- pit_check_level(attacker)
- send victim title "{@death-title}" with subtitle "{@death-subtitle}" for 1 seconds
- wait 1 seconds
- pit_equip(victim)
- pit_updatetag(victim)
- set {pit.%uuid of victim%.status} to "&aIdling"
- else:
- stop
- on right click with golden apple:
- if {pit.%uuid of player%.state} is "ingame":
- if {pit.%uuid of player%.perk::slot-1} or {pit.%uuid of player%.perk::slot-2} = "GOLDEN-HEADS":
- remove regeneration from player
- remove absorption from player
- apply regeneration 2 to the player for 5 seconds
- apply absorption 1 to the player for 120 seconds
- remove 1 golden apple from player
- else:
- stop
- else:
- stop
- function pit_check_level(p: player):
- set {_uuid} to uuid of {_p}
- if {pit.%{_uuid}%.xp} >= {pit.%{_uuid}%.xp-need}:
- remove {pit.%{_uuid}%.xp-need} from {pit.%{_uuid}%.xp}
- set {_old} to {pit.%{_uuid}%.level}
- add 1 to {pit.%{_uuid}%.level}
- pit_updatetag({_p})
- send "{@prefix} {@level-up}" to {_p}
- send {_p} title "{@level-up-title}" with subtitle "{@level-up-subtitle}" for 3 seconds
- if {pit.%{_uuid}%.level} < 10:
- add 50 to {pit.%{_uuid}%.xp-need}
- stop
- if {pit.%{_uuid}%.level} < 20:
- add 70 to {pit.%{_uuid}%.xp-need}
- stop
- if {pit.%{_uuid}%.level} < 30:
- add 80 to {pit.%{_uuid}%.xp-need}
- stop
- if {pit.%{_uuid}%.level} < 50:
- add 100 to {pit.%{_uuid}%.xp-need}
- stop
- else:
- add 120 to {pit.%{_uuid}%.xp-need}
- stop
- function pit_perk_shop(p: player, slot: integer):
- set {_uuid} to uuid of {_p}
- open virtual chest inventory with size 3 named "Chose a Perk" to {_p}
- make a gui slot 12 of {_p} with gold block named "&cGolden Heads" with lore "||&7Golden apples you earn turn into &6Golden Heads||||&8&l- &7COST: &6&l500||" to run:
- if {pit.%{_uuid}%.perk::golden-heads} is not set:
- if {pit.%{_uuid}%.gold} >= 500:
- set {pit.%{_uuid}%.perk::golden-heads} to true
- set {pit.%{_uuid}%.perk::slot-%{_slot}%} to "GOLDEN-HEADS"
- remove 500 from {pit.%{_uuid}%.gold}
- send "{@prefix} {@perk-purchase}"
- pit_upgrades_shop({_p})
- stop
- else:
- send "{@prefix} {@no-gold}"
- stop
- else:
- set {pit.%{_uuid}%.perk::slot-%{_slot}%} to "GOLDEN-HEADS"
- pit_upgrades_shop({_p})
- send "{@prefix} {@perk-selected}"
- stop
- make a gui slot 14 of {_p} with fishing rod named "&cFishing rod" with lore "||&7Spawn with a fishing rod||||&8&l- &7COST: &6&l1000||" to run:
- if {pit.%{_uuid}%.perk::fishing-rod} is not set:
- if {pit.%{_uuid}%.gold} >= 1000:
- set {pit.%{_uuid}%.perk::fishing-rod} to true
- set {pit.%{_uuid}%.perk::slot-%{_slot}%} to "FISHING-ROD"
- remove 1000 from {pit.%{_uuid}%.gold}
- send "{@prefix} {@perk-purchase}"
- pit_upgrades_shop({_p})
- stop
- else:
- send "{@prefix} {@no-gold}"
- stop
- else:
- set {pit.%{_uuid}%.perk::slot-%{_slot}%} to "FISHING-ROD"
- pit_upgrades_shop({_p})
- send "{@prefix} {@perk-selected}"
- stop
- command setgold:
- trigger:
- set {pit.%uuid of player%.gold} to 100000
- function pit_upgrades_shop(p: player):
- set {_uuid} to uuid of {_p}
- open virtual chest inventory with size 5 named "Permanent upgrades" to {_p}
- wait 1 ticks
- if {pit.%{_uuid}%.perk::slot-1} is not set:
- make a gui slot 12 of {_p} with diamond block named "&aPERK SLOT ##1" with lore "||&7Select a perk to fill this slot||||&eClick to chose perk!||" to run function pit_perk_shop({_p}, 1)
- if {pit.%{_uuid}%.perk::slot-2} is not set:
- make a gui slot 14 of {_p} with diamond block named "&aPERK SLOT ##2" with lore "||&7Select a perk to fill this slot||||&eClick to chose perk!||" to run function pit_perk_shop({_p}, 2)
- if {pit.%{_uuid}%.perk::slot-1} is set:
- if {pit.%{_uuid}%.perk::slot-1} = "GOLDEN-HEADS":
- make a gui slot 12 of {_p} with gold block named "&ePERK SLOT &3##2 &7- &6&lGOLDEN HEADS" to run function pit_perk_shop({_p}, 1)
- if {pit.%{_uuid}%.perk::slot-1} = "FISHING-ROD":
- make a gui slot 12 of {_p} with fishing rod named "&ePERK SLOT &3##2 &7- &9&lFISHING ROD" to run function pit_perk_shop({_p}, 1)
- if {pit.%{_uuid}%.perk::slot-2} is set:
- if {pit.%{_uuid}%.perk::slot-2} = "GOLDEN-HEADS":
- make a gui slot 14 of {_p} with gold block named "&ePERK SLOT &3##2 &7- &6&lGOLDEN HEADS" to run function pit_perk_shop({_p}, 2)
- if {pit.%{_uuid}%.perk::slot-2} = "FISHING-ROD":
- make a gui slot 14 of {_p} with fishing rod named "&ePERK SLOT &3##2 &7- &9&lFISHING ROD" to run function pit_perk_shop({_p}, 2)
- function pit_items_shop(p: player):
- open virtual chest inventory with size 3 named "Non-permanent items" to {_p}
- wait 1 ticks
- make a gui slot 10 of {_p} with diamond_sword named "&e&lDIAMOND SWORD" with lore "||&8&l- &7LOST ON DEATH||||&8&l- &7COST: &6&l100" to run:
- set {_uuid} to uuid of {_p}
- if {pit.%{_uuid}%.gold} >= 100:
- remove 100 from {pit.%{_uuid}%.gold}
- give 1 diamond_sword to {_p}
- set {_item} to "DIAMOND SWORD"
- send "{@prefix} {@item-purchase}" to {_p}
- else:
- send "{@prefix} {@no-gold}"
- make a gui slot 11 of {_p} with 8 obsidian named "&e&lOBSIDIAN" with lore "||&8&l- &7REMAINS FOR 120 SECONDS||||&8&l- &7LOST ON DEATH||||&8&l- &7COST: &6&l40" to run:
- set {_uuid} to uuid of {_p}
- if {pit.%{_uuid}%.gold} >= 40:
- remove 100 from {pit.%{_uuid}%.gold}
- give 8 obsidian to {_p}
- set {_item} to "OBSIDIAN"
- send "{@prefix} {@item-purchase}" to {_p}
- else:
- send "{@prefix} {@no-gold}"
- make a gui slot 15 of {_p} with diamond_chestplate named "&e&lDIAMOND CHESTPLATE" with lore "||&8&l- &7AUTO EQUIP ON BUY||||&8&l- &7LOST ON DEATH||||&8&l- &7COST: &6&l250" to run:
- set {_uuid} to uuid of {_p}
- if {pit.%{_uuid}%.gold} >= 250:
- remove 100 from {pit.%{_uuid}%.gold}
- set {_p}'s chestplate to diamond_chestplate
- set {_item} to "DIAMOND CHESTPLATE"
- send "{@prefix} {@item-purchase}" to {_p}
- else:
- send "{@prefix} {@no-gold}"
- make a gui slot 16 of {_p} with diamond_boots named "&e&lDIAMOND BOOTS" with lore "||&8&l- &7AUTO EQUIP ON BUY||||&8&l- &7LOST ON DEATH||||&8&l- &7COST: &6&l150" to run:
- set {_uuid} to uuid of {_p}
- if {pit.%{_uuid}%.gold} >= 150:
- remove 100 from {pit.%{_uuid}%.gold}
- set {_p}'s boots to diamond_boots
- set {_item} to "DIAMOND BOOTS"
- send "{@prefix} {@item-purchase}" to {_p}
- else:
- send "{@prefix} {@no-gold}"
- on place:
- if {pit.%uuid of player%.state} is "ingame":
- if event-block is not obsidian:
- cancel event
- else:
- wait 120 seconds
- set event-block to air
- else:
- stop
- on break:
- if {pit.%uuid of player%.state} is "ingame":
- cancel event
- else:
- stop
- on drop:
- if {pit.%uuid of player%.state} is "ingame":
- cancel event
- else:
- stop
- on right click on entity:
- if {pit.%uuid of player%.state} is "ingame":
- if citizen id of event-entity is {@shop-id}:
- pit_items_shop(player)
- if citizen id of event-entity is {@upgrade-id}:
- pit_upgrades_shop(player)
- else:
- stop
- function pit_updatetag(p: player):
- set {_uuid} to uuid of {_p}
- make console execute command "nte player %{_p}% prefix &7[&e%{pit.%{_uuid}%.level}%&7] &7"
- function pit_equip(p: player):
- set {_uuid} to uuid of {_p}
- set {_p}'s helmet to chain_helmet
- set {_p}'s chestplate to chain_chestplate
- set {_p}'s leggings to iron_leggings
- set {_p}'s boots to iron_boots
- set slot 0 of {_p} to iron_sword
- set slot 1 of {_p} to bow
- if {pit.%{_uuid}%.perk::slot-1} = "FISHING-ROD":
- set slot 2 of {_p} to fishing rod
- set slot 8 of {_p} to 30 arrows
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement