Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #©
- #- Reselling/Reuploading while claiming that it is yours or made by you is disallowed
- #- Do not edit it and upload it as your own
- #- While using it in a video, please feature everything under "Video"
- #©
- #
- #Video:
- #Skript made by Zeldaboy111
- #More content of the creator: https://forums.skunity.com/search/26443679/
- options:
- logo: &6Guns &8:&7
- cLogo: &f[&6Guns&f] &8:&7
- on enable:
- set {guns.list::*} to "pistol" and "rifle"
- set {guns.info.names::*} to "&7Pistol" and "&9Rifle"
- set {guns.specs.shooting.types::*} to "semi-automatic" and "automatic"
- set {guns.specs.shooting.speed::*} to "1" and "4"
- set {guns.specs.shooting.strength::*} to "2" and "3"
- set {guns.specs.reload.speed::*} to "5" and "2"
- set {guns.specs.reload.amount::*} to "7" and "31"
- #========================================
- # F U N C T I O N S
- #========================================
- function getGun(p: Player, gun: String):
- loop {guns.list::*}:
- if loop-value is {_gun} in lower case:
- set {_value} to loop-index
- stop loop
- if {_value} is set:
- give {_p} iron horse armor named "%{guns.info.names::%{_value}%}%" with lore "" and "&7Ammo: %{guns.specs.reload.amount::%{_value}%}% / %{guns.specs.reload.amount::%{_value}%}%" without any NBT
- send "{@logo} &e%{_gun}% &7given!" to {_p}
- else:
- send "{@logo} The gun &e%{_gun}% &7doesn't exist." to {_p}
- function selectGun(p: Player):
- delete {heldGun.%{_p}%}
- delete {heldGun.%{_p}%.index}
- set {_name} to name of {_p}'s held item
- loop {guns.info.names::*}:
- if loop-value is {_name}:
- set {heldGun.%{_p}%} to {guns.list::%loop-index%}
- set {heldGun.%{_p}%.index} to loop-index
- stop loop
- function gunInfo(p: Player, gun: String):
- send "{@logo} &c&lWIP &8(&7Work In Progress&8)" to {_p}
- #========================================
- # C O M M A N D S
- #========================================
- command /guns [<text>] [<text>]:
- aliases: /gun
- trigger:
- executor is player:
- if player has permission "guns":
- if arg-1 is "help":
- send "&7&m &7{ &6Guns &7}&m "
- send "<cmd:/guns list><ttp:&8Get a list of all the guns>&e/guns list"
- send "<sgt:/guns get <gun>><ttp:&8Get a gun>&e/guns get <gun>"
- send "<sgt:/guns info [gun]><ttp:&8Get the information [about a gun]>&e/guns info [gun]"
- send "&7Tip&8: &7Try hovering over and clicking on the messages!"
- send "&7&m &7{ &6Guns &7}&m "
- else if arg-1 is "list":
- send "{@logo} &7Here is a list from all the guns&8:%nl%&epistol&8, &erifle"
- else if arg-1 is "get":
- if arg-2 is set:
- getGun(player, arg-2)
- else:
- send "{@logo} &7You need to give up a &egun&7."
- else if arg-1 is "info":
- if arg-2 is set:
- gunInfo(player, arg-2)
- else:
- send "{@logo} &7You need to give up a &egun&7."
- else:
- send "{@logo} &7Do &e/guns help &7for more info!"
- else:
- send "{@cLogo} &7This command can only be executed by a player!"
- on right click with iron horse armor:
- if {heldGun.%player%} or {heldGun.%player%.index} is not set:
- set {_new} to true
- else if {heldGun.%player%} is not name of player's held item:
- set {_new} to true
- if {_new}:
- selectGun(player)
- if {heldGun.%player%} and {heldGun.%player%.index} is set:
- set {_lore::*} to lore of player's held item
- set {_ammo} to {_lore::2}
- replace all "&7Ammo: " in {_ammo} with ""
- replace all " / %{guns.specs.reload.amount::%{heldGun.%player%.index}%}%" in {_ammo} with ""
- set {_ammo} to {_ammo} parsed as a number
- if {_ammo} < 1:
- send "{@logo} You have to reload!"
- else:
- set {_newLore::*} to {_lore::*}
- set {_newLore::2} to "&7Ammo: %{_ammo} - 1% / %{guns.specs.reload.amount::%{heldGun.%player%.index}%}%"
- set lore of player's held item to {_newLore::*}
- play raw sound "BLOCK_LEVER_CLICK" at player with pitch 7 volume 10
- loop 15 times:
- set {_loc} to location 1 meters above and loop-value-0.5 meters in front of player
- show 4 "Smoke Large" particles at {_loc} for player offset by 0.2, 0.2, 0.2
- loop all entities in radius 1 around location 1 meters above and loop-value meters in front of player:
- if loop-entity is not player:
- damage loop-entity by ({guns.specs.shooting.strength::%{heldGun.%player%.index}%} parsed as a number)
- on left click with iron horse armor:
- #RELOAD SYSTEM
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement