Advertisement
petethepossum

KitpVp core skript ver 1

Dec 11th, 2019
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.33 KB | None | 0 0
  1. options:
  2. #
  3. # nCore by Vaded
  4. # Version 1.0
  5. # Requirements: SkQuery, Skript (2.1.2+)
  6. #
  7. Color: &a
  8. deny-message: &cYou do not have permission to execute this command.
  9.  
  10.  
  11. #------------------------------------------------------------------
  12.  
  13. # Scoreboard
  14.  
  15. on right click:
  16. if {staffmode.%player%} is not set:
  17. if player is holding ender pearl:
  18. set {_waited} to difference between {pearl.%player%.lastused} and now
  19. if {_waited} is less than 15 seconds:
  20. send "&eYou cannot use this for another {@Color}%difference between 15 seconds and {_waited}%&e."
  21. cancel event
  22. stop
  23. wipe player's sidebar
  24. delete stylish scoreboard "MainE-%player%"
  25. wait 1 tick
  26. create new stylish scoreboard named "MainE-%player%"
  27. set title of stylish scoreboard "MainE-%player%" to "&a&lKitPVP"
  28. create a new id based score "MainE-%player%grayLine-1" with text "&a&7&m----------------------" slot 0 for stylish scoreboard "MainE-%player%"
  29. create a new id based score "MainE-%player%grayLine-2" with text "&d&7&m----------------------" slot 12 for stylish scoreboard "MainE-%player%"
  30. create a new id based score "MainE-%player%Balance" with text "&eBalance&7: &f%{balance.%player's uuid%}%" slot 11 for stylish scoreboard "MainE-%player%"
  31. create a new id based score "MainE-%player%Deaths" with text "&eDeaths&7: &f%{deaths.%player's uuid%}%" slot 10 for stylish scoreboard "MainE-%player%"
  32. create a new id based score "MainE-%player%Kills" with text "&eKills&7: &f%{kills.%player's uuid%}%" slot 9 for stylish scoreboard "MainE-%player%"
  33. create a new id based score "MainE-%player%Level" with text "&eLevel&7: &f%{level.%player's uuid%}%" slot 8 for stylish scoreboard "MainE-%player%"
  34. create a new id based score "MainE-%player%Level-progress" with text "&eLevel Progress&7: &f%{next-level.%player's uuid%}%/20" slot 7 for stylish scoreboard "MainE-%player%"
  35. create a new id based score "MainE-%player%Ping" with text "&ea" slot 6 for stylish scoreboard "MainE-%player%"
  36. create a new id based score "MainE-%player%grayLinePearl" with text "&c&d&7&m----------------------" slot 5 for stylish scoreboard "MainE-%player%"
  37. create a new id based score "MainE-%player%Blank" with text "&a&e&b&3" slot 4 for stylish scoreboard "MainE-%player%"
  38. create a new id based score "MainE-%player%Cooldown-Head" with text "&6&lPearl Cooldown:" slot 3 for stylish scoreboard "MainE-%player%"
  39. create a new id based score "MainE-%player%Cooldown" with text "&c%difference between 15 seconds and {_waited}%" slot 2 for stylish scoreboard "MainE-%player%"
  40. create a new id based score "MainE-%player%Blank2" with text "&a " slot 1 for stylish scoreboard "MainE-%player%"
  41. set stylish scoreboard of player to "MainE-%player%"
  42. set {pearl.%player%.lastused} to now
  43. player command "resume-scoreboard-main-pearl"
  44.  
  45. on damage:
  46. set {combat.%victim%.lastused} to now
  47. set {combat.%attacker%.lastused} to now
  48.  
  49. command /resume-scoreboard-main-pearl [<text>]:
  50. trigger:
  51. wait 15 seconds
  52. set stylish scoreboard of player to "Main-%player%"
  53. send "&eYour pearl cooldown has expired!"
  54.  
  55. every 2 ticks:
  56. loop all players:
  57. if {staffmode.%loop-player%} is not set:
  58. set {_waited} to difference between {pearl.%loop-player%.lastused} and now
  59. if {_waited} is less than 15 seconds:
  60. set text of id "MainE-%loop-player%Balance" to " &eBalance&7: &f$%{balance.%loop-player's uuid%}%"
  61. set text of id "MainE-%loop-player%Deaths" to " &eDeaths&7: &f%{deaths.%loop-player's uuid%}%"
  62. set text of id "MainE-%loop-player%Kills" to " &eKills&7: &f%{kills.%loop-player's uuid%}%"
  63. set text of id "MainE-%loop-player%Level" to " &eLevel&7: &f%{level.%loop-player's uuid%}%"
  64. set text of id "MainE-%loop-player%Level-progress" to " &eLevel Progress&7: &f%{next-level.%loop-player's uuid%}%/20"
  65. set text of id "MainE-%loop-player%Ping" to " &ePing&7: &f%loop-player's ping%"
  66. set text of id "MainE-%loop-player%Cooldown" to " &c%difference between 15 seconds and {_waited}%"
  67.  
  68. on join:
  69. wipe player's sidebar
  70. delete stylish scoreboard "Main-%player%"
  71. wait 1 tick
  72. create new stylish scoreboard named "Main-%player%"
  73. set title of stylish scoreboard "Main-%player%" to "&a&lKitPVP"
  74. create a new id based score "Main-%player%grayLine-1" with text "&a&7&m----------------------" slot 0 for stylish scoreboard "Main-%player%"
  75. create a new id based score "Main-%player%grayLine-2" with text "&d&7&m----------------------" slot 7 for stylish scoreboard "Main-%player%"
  76. create a new id based score "Main-%player%Balance" with text "&eBalance&7: &f%{balance.%player's uuid%}%" slot 6 for stylish scoreboard "Main-%player%"
  77. create a new id based score "Main-%player%Deaths" with text "&eDeaths&7: &f%{deaths.%player's uuid%}%" slot 5 for stylish scoreboard "Main-%player%"
  78. create a new id based score "Main-%player%Kills" with text "&eKills&7: &f%{kills.%player's uuid%}%" slot 4 for stylish scoreboard "Main-%player%"
  79. create a new id based score "Main-%player%Level" with text "&eLevel&7: &f%{level.%player's uuid%}%" slot 3 for stylish scoreboard "Main-%player%"
  80. create a new id based score "Main-%player%Level-progress" with text "&eLevel Progress&7: &f%{next-level.%player's uuid%}%/20" slot 2 for stylish scoreboard "Main-%player%"
  81. create a new id based score "Main-%player%Ping" with text "&ea" slot 1 for stylish scoreboard "Main-%player%"
  82. set stylish scoreboard of player to "Main-%player%"
  83.  
  84. every 2 tick:
  85. loop all players:
  86. if {staffmode.%loop-player%} is not set:
  87. set {_waited} to difference between {pearl.%loop-player%.lastused} and now
  88. if {_waited} is less than 15 seconds:
  89. stop
  90. set text of id "Main-%loop-player%Balance" to " &eBalance&7: &f$%{balance.%loop-player's uuid%}%"
  91. set text of id "Main-%loop-player%Deaths" to " &eDeaths&7: &f%{deaths.%loop-player's uuid%}%"
  92. set text of id "Main-%loop-player%Kills" to " &eKills&7: &f%{kills.%loop-player's uuid%}%"
  93. set text of id "Main-%loop-player%Level" to " &eLevel&7: &f%{level.%loop-player's uuid%}%"
  94. set text of id "Main-%loop-player%Level-progress" to " &eLevel Progress&7: &f%{next-level.%loop-player's uuid%}%/20"
  95. set text of id "Main-%loop-player%Ping" to " &ePing&7: &f%loop-player's ping%"
  96.  
  97.  
  98.  
  99. #------------------------------------------------------------------
  100.  
  101. # -Kits-
  102.  
  103. command /kit [<text>] [<offline player>] [<text>]:
  104. permission: ncore.command.kits
  105. permission message: {@deny-message}
  106. aliases: /ncore:kit, /kits, /ncore:kits
  107. trigger:
  108. if {staffmode.%player%} is set:
  109. send "&cYou cannot use this command at this time."
  110. stop
  111. if arg 3 is set:
  112. send "&cUnknown command."
  113. else:
  114. if arg 1 is not set:
  115. if {kits::*} is not set:
  116. send "&cThere are currently no available kits."
  117. else:
  118. set {_kits} to "%{kits::*}%"
  119. replace all "*" in {_kits} with "{@Color}"
  120. replace all ", " with "&e, " in {_kits}
  121. replace " and " with "&e, " in {_kits}
  122. send "&eKits: %{_kits}%"
  123. else:
  124. if arg 2 is set:
  125. if {staffmode.%arg-2%} is set:
  126. send "&cYou cannot give this player a kit at this time."
  127. stop
  128. if arg 2 is not online:
  129. send "&cThere is no one named %arg-2% online."
  130. stop
  131. if player does not have permission "ncore.command.kit.others":
  132. send "&cUnknown command."
  133. stop
  134. if {kit.%arg-1%} is not set:
  135. send "&cThere is no kit named &e%arg-1%&c."
  136. stop
  137. if player does not have permission "ncore.kit.%arg-1%":
  138. send "&cYou do not have permission to use this kit."
  139. stop
  140. else:
  141. set {_waited} to difference between {kit.%arg-1%.lastused.%arg-2%} and now
  142. if {_waited} is less than {kit.%arg-2%.cooldown}:
  143. send "&cYou are on cooldown for kit %{kit.%arg-1%}% for %{kit.%arg-1%.cooldown}%."
  144. stop
  145. set {kit.%arg-1%.lastused.%arg-2%} to now
  146. set {_slot} to 0
  147. loop 36 times:
  148. set slot {_slot} of arg 2 to {kit.%arg-1%.slot.%{_slot}%}
  149. add 1 to {_slot}
  150. send "&eYou have recieved kit {@Color}%{kit.%arg-1%}%&e." to arg 2
  151. send "&eYou have given kit {@Color}%{kit.%arg-1%}% &eto {@Color}%arg-2%&e."
  152. else:
  153. if {kit.%arg-1%} is not set:
  154. send "&cThere is no kit named &e%arg-1%&c."
  155. stop
  156. if player does not have permission "ncore.kit.%arg-1%":
  157. send "&cYou do not have permission to use this kit."
  158. stop
  159. else:
  160. set {_waited} to difference between {kit.%arg-1%.lastused.%player%} and now
  161. if {_waited} is less than {kit.%arg-1%.cooldown}:
  162. send "&cYou are on cooldown for kit %{kit.%arg-1%}% for %{kit.%arg-1%.cooldown}%."
  163. stop
  164. set {kit.%arg-1%.lastused.%player%} to now
  165. set {_slot} to 0
  166. loop 36 times:
  167. set slot {_slot} of player to {kit.%arg-1%.slot.%{_slot}%}
  168. add 1 to {_slot}
  169. send "&eYou have recieved kit {@Color}%{kit.%arg-1%}%&e."
  170.  
  171.  
  172.  
  173.  
  174. command /createkit [<text>] [<timespan>]:
  175. permission: ncore.command.addkit
  176. permission message: {@deny-message}
  177. aliases: /ncore:addkit, /addkit, /ncore:createkit, /setkit, /ncore:setkit
  178. trigger:
  179. if {oijsdoif} is set:
  180. delete {orakoiroirjt}
  181. else:
  182. if arg 2 is not set:
  183. send "&cUsage: /createkit <name> [time]"
  184. else:
  185. if arg 1 contains "*":
  186. send "&cPlease do not include any special characters."
  187. stop
  188. if arg 1 contains " ":
  189. send "&cPlease do not include any spaces."
  190. stop
  191. if {kit.%arg-1%} is set:
  192. send "&cThis kit already exists!"
  193. else:
  194. add 1 to {kits}
  195. set {kit-id.%{kits}%} to arg 1
  196. set {kit.%arg-1%} to arg 1
  197. set {kit.%arg-1%.cooldown} to arg 2
  198. add "*%arg-1%" to {kits::*}
  199. set {_slot} to 0
  200. loop 35 times:
  201. set {kit.%arg-1%.slot.%{_slot}%} to slot {_slot} of player
  202. add 1 to {_slot}
  203. send "&eYou have created kit {@Color}%arg-1%&e with a delay of {@Color}%arg-2%&e."
  204.  
  205.  
  206. on inventory click:
  207. if inventory name of player's current inventory contains "Select a Kit":
  208. cancel event
  209. if clicked item is paper:
  210. player command "kit %uncolored name of clicked item%"
  211.  
  212. command /deletekit [<text>] [<text>]:
  213. permission: ncore.command.deletekit
  214. permission message: {@deny-message}
  215. aliases: /ncore:deletekit, /ncore:delkit, /delkit, /remkit, /removekit, /ncore:delkit, /ncore:remkit, /ncore:removekit
  216. trigger:
  217. if arg 2 is set:
  218. send "&cUnknown command."
  219. else:
  220. if arg 1 is not set:
  221. send "&cUsage: /delkit [kit]"
  222. else:
  223. if {kit.%arg-1%} is not set:
  224. send "&cThis kit does not exist."
  225. else:
  226. remove "*%{kit.%arg-1%}%" from {kits::*}
  227. send "&eYou have removed kit {@Color}%{kit.%arg-1%}%&e."
  228. delete {kit.%arg-1%}
  229.  
  230. command /warp [<text>] [<offline player>] [<text>]:
  231. permission: ncore.command.warp
  232. permission message: {@deny-message}
  233. aliases: /warps, /ncore:warp, /ncore:warps
  234. trigger:
  235. if arg 3 is set:
  236. send "&cUnknown command."
  237. stop
  238. if arg 1 is not set:
  239. if {warps::*} is not set:
  240. send "&cThere are currently no available warps."
  241. else:
  242. set {_warps} to "%{warps::*}%"
  243. replace all "*" with "{@Color}" in {_warps}
  244. replace all ", " with "&e, " in {_warps}
  245. replace " and " with "&e, " in {_warps}
  246. send "&eWarps: %{_warps}%"
  247. else:
  248. if arg 2 is set:
  249. if arg 2 is not online:
  250. send "&cThere is no one named %arg-2% online."
  251. stop
  252. if {warp.%arg-1%} is not set:
  253. send "&cThere is no warp named &e%arg-1%&c."
  254. else:
  255. if player does not have permission "ncore.warp.%arg-1%":
  256. send "&cYou do not have permission to warp to &e%{warp.%arg-1%}%&c."
  257. else:
  258. teleport arg 2 to {warp.%{warp.%arg-1%}%.location}
  259. send "&eYou have warped to {@Color}%{warp.%arg-1%}%e." to arg 2
  260. send "&eYou have warped {@Color}%arg-2%} &eto {@Color}%{warp.%arg-1%}%&e."
  261. if player has permission "ncore.staff":
  262. loop all players:
  263. if loop-player has permission "ncore.notify.warp":
  264. send "&7&o[%player%: &ewarped %arg-2% to %{warp.%arg-1%}%&7&o]" to loop-player
  265. else:
  266. if {warp.%arg-1%} is not set:
  267. send "&cThere is no warp named &e%arg-1%&c."
  268. else:
  269. if player does not have permission "ncore.warp.%arg-1%":
  270. send "&cYou do not have permission to use this warp."
  271. else:
  272. teleport player to {warp.%{warp.%arg-1%}%.location}
  273. send "&eYou have warped to {@Color}%{warp.%arg-1%}%&e."
  274. if player has permission "ncore.staff":
  275. loop all players:
  276. if loop-player has permission "ncore.notify.warp":
  277. send "&7&o[%player%: &ewarped to %{warp.%arg-1%}%&7&o]" to loop-player
  278.  
  279. command /createwarp [<text>] [<text>]:
  280. permission: ncore.command.createwarp
  281. permission message: {@deny-message}
  282. aliases: /ncore:setwarp, /ncore:createwarp, /ncore:addwarp, /createwarp, /addwarp
  283. trigger:
  284. if arg 2 is set:
  285. send "&cUnknown command."
  286. else:
  287. if arg 1 is not set:
  288. send "&cUsage: /createwarp <name>"
  289. else:
  290. if arg 1 contains "*":
  291. send "&cPlease do not include any special characters."
  292. else:
  293. if {warp.%arg-1%} is set:
  294. send "&cThere is already a warp named &e%{warp.%arg-1%}%&c."
  295. else:
  296. if block under player is air:
  297. send "&cYou cannot set a warp at this time, try moving to another location."
  298. else:
  299. set {warp.%arg-1%} to arg 1
  300. set {warp.%{warp.%arg-1%}%.location} to player's location
  301. add "*%arg-1%" to {warps::*}
  302. send "&eYou have created the {@Color}%{warp.%arg-1%}% &ewarp."
  303.  
  304. command /deletewarp [<text>] [<text>]:
  305. permission: ncore.command.deletewarp
  306. permission message: {@deny-message}
  307. aliases: /ncore:deletewarp, /delwarp, /ncore:delwarp, /remwarp, /ncore:remwarp, /removewarp, /ncore:removewarp
  308. trigger:
  309. if arg 2 is set:
  310. send "&cUnknown command."
  311. else:
  312. if arg 1 is not set:
  313. send "&cUsage: /deletewarp [warp]"
  314. else:
  315. if arg 1 contains "*":
  316. send "&cPlease do not include any special characters."
  317. else:
  318. if {warp.%arg-1%} is not set:
  319. send "&cThere is no warp named &e%arg-1%&c."
  320. else:
  321. delete {warp.%{warp.%arg-1%}%.location}
  322. remove "*%arg-1%" from {warps::*}
  323. send "&eYou have removed the {@Color}%{warp.%arg-1%}% &ewarp."
  324. delete {warp.%arg-1%}
  325.  
  326. on death:
  327. if attacker is set:
  328. if attacker is not victim:
  329. if {next-level.%attacker's uuid%} > 18:
  330. add 1 to {level.%attacker's uuid%}
  331. set {next-level.%attacker's uuid%} to -1
  332. send "&eYou have leveled up to {@Color}%{level.%attacker's uuid%}%&e." to attacker
  333. add 100 to {balance.%attacker's uuid%}
  334. console command "bc {@Color}%attacker% &ehas leveled up to {@Color}%{level.%attacker's uuid%}%&e."
  335. add 20 to {balance.%attacker's uuid%}
  336. send "&aYou have recieved $20 for killing %victim%." to attacker
  337. add 1 to {kills.%attacker's uuid%}
  338. add 1 to {next-level.%attacker's uuid%}
  339. add 1 to {deaths.%victim's uuid%}
  340. if {next-level.%victim's uuid%} > 0:
  341. remove 1 from {next-level.%victim's uuid%}
  342.  
  343. on join:
  344. if {kills.%player's uuid%} is not set:
  345. set {kills.%player's uuid%} to 0
  346. if {deaths.%player's uuid%} is not set:
  347. set {deaths.%player's uuid%} to 0
  348. if {next-level.%player's uuid%} is not set:
  349. set {next-level.%player's uuid%} to 0
  350.  
  351. command /balance [<offline player>] [<text>]:
  352. permission: ncore.command.balance
  353. permission message: {@deny-message}
  354. aliases: /ncore:balance, /bal, /ncore:bal
  355. trigger:
  356. if arg 1 is not set:
  357. send "{@Color}%player%'s &ebalance: {@Color}$%{balance.%player's uuid%}%"
  358. else:
  359. if arg 1 is "%player%":
  360. send "{@Color}%player%'s &ebalance: {@Color}$%{balance.%player's uuid%}%"
  361. else:
  362. if {vanish.%arg-1%} is set:
  363. send "&cThere is no one named %arg-1% online."
  364. else:
  365. if {balance.%arg-1's uuid%} is not set:
  366. send "&cThis player has never joined before."
  367. else:
  368. send "{@Color}%arg-1%'s &ebalance: {@Color}$%{balance.%arg-1's uuid%}%"
  369.  
  370. on join:
  371. if {balance.%player's uuid%} is not set:
  372. set {balance.%player's uuid%} to 0
  373.  
  374. command /eco [<string>] [<offline player>] [<text>] [<text>]:
  375. permission: ncore.command.eco
  376. permission message: {@deny-message}
  377. aliases: /ncore:eco
  378. trigger:
  379. if arg 4 is set:
  380. send "&cUnknown command."
  381. stop
  382. if arg 1 is not set:
  383. send "&cUsage: /eco [subcommand] <player> <args>"
  384. else:
  385. if arg 1 is "help":
  386. send "&e/eco give <player> <amount>"
  387. send "&e/eco take <player> <amount>"
  388. send "&e/eco reset <player>"
  389. else if arg 1 is "give":
  390. if arg 3 is not set:
  391. send "&cUsage: /eco give <player> <amount>"
  392. else:
  393. if {balance.%arg-2's uuid%} is not set:
  394. send "&cThis player has never joined before."
  395. else:
  396. add ("%arg-3%" parsed as integer) to {balance.%arg-2's uuid%}
  397. send "{@Color}$%arg-3% &ehas been added to your balance." to arg 2
  398. send "&e{@Color}%arg-2%'s &ebalance has been updated to {@Color}$%{balance.%arg-2's uuid%}%&e."
  399. loop all players:
  400. if loop-player has permission "ncore.notify.eco.give":
  401. send "&7&o[%player%: &eadded $%arg-3% to %arg-2%'s balance&7&o]" to loop-player
  402. else if arg 1 is "take":
  403. if arg 3 is not set:
  404. send "&cUsage: /eco take <player> <amount>"
  405. else:
  406. if {balance.%arg-2's uuid%} is not set:
  407. send "&cThis player has never joined before."
  408. else:
  409. if {balance.%arg-2's uuid%} < ("%arg-3%" parsed as an integer):
  410. send "&c{@Color}%arg-2% does not have %arg-3%&c."
  411. else:
  412. remove arg 3 from {balance.%arg-2's uuid%}
  413. send "{@Color}$%arg-3% &ehas been removed from your balance." to arg 2
  414. send "{@Color}%arg-2%'s &ebalance has been updated to {@Color}$%{balance.%arg-2's uuid%}%&e."
  415. loop all players:
  416. if loop-player has permission "ncore.notify.eco.taken":
  417. send "&7&o[%player%: &etook $%arg-3% from %arg-2%'s balance&7&o]" to loop-player
  418. else if arg 1 is "reset":
  419. if arg 3 is set:
  420. send "&cUnknown command."
  421. stop
  422. if arg 2 is not set:
  423. send "&cUsage: /eco reset <player>"
  424. else:
  425. if {balance.%arg-2's uuid%} is not set:
  426. send "&cThis player has never joined before."
  427. stop
  428. if {balance.%arg-2's uuid%} < 1:
  429. send "&cThis player does not have any funds to reset."
  430. else:
  431. set {balance.%arg-2's uuid%} to 0
  432. send "&eYour balance has been reset." to arg 2
  433. send "{@Color}%arg-2%'s &ebalance has been updated to {@Color}$%{balance.%arg-2's uuid%}%&e."
  434. loop all players:
  435. if loop-player has permission "ncore.notify.eco.give":
  436. send "&7&o[%player%: &ereset %arg-2%'s balance&7&o]" to loop-player
  437. else:
  438. send "&cInvalid sub command, type /eco help"
  439.  
  440. on respawn:
  441. teleport player to {spawn}
  442.  
  443.  
  444. command /level [<offline player>] [<text>]:
  445. permission: ncore.command.level
  446. permission message: {@deny-message}
  447. aliases: /ncore:level, /checklevel, /ncore:checklevel
  448. trigger:
  449. if arg 2 is set:
  450. send "&cUnknown command."
  451. else:
  452. if arg 1 is not set:
  453. send "{@Color}%player%'s &elevel: {@Color}%{level.%player's uuid%}%"
  454. else:
  455. if arg 1 is "%player%":
  456. send "{@Color}%player%'s &elevel: {@Color}%{level.%player's uuid%}%"
  457. stop
  458. if {vanish.%arg-1%} is set:
  459. send "&cThere is no one named %arg-1% online."
  460. stop
  461. if {level.%arg-1's uuid%} is not set:
  462. send "&cThis player has never joined before."
  463. else:
  464. send "{@Color}%arg-2%'s &elevel: {@Color}%{level.%arg-1's uuid%}%"
  465.  
  466. on join:
  467. if {level.%player's uuid%} is not set:
  468. set {level.%player's uuid%} to 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement