1. Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Help with making a "minigun"

Discussion in 'Skript' started by SquidR, Jan 28, 2021.

Tags:
Thread Status:
Not open for further replies.
  1. SquidR

    SquidR New Member

    Joined:
    Jan 28, 2021
    Messages:
    5
    Likes Received:
    0
    So my code is as follows

    on right click with bow:
    execute console command "execute as @p at @p run summon arrow ~ ~ ~ {Motion:[1.0,0.0,0.0]}":

    I'm trying to make it fire in a direction, but when i try to run it, it shows as an error but there is no error without the motion nbt tag.
     
  2. protect_identity

    Joined:
    Jan 29, 2021
    Messages:
    1
    Likes Received:
    0
    simple code, the tool needs to be a diamond hoe and named Machine Gun.
    Code (Text):
    1. on right click:
    2.     if player's tool is diamond hoe:
    3.         if uncolored name of player's tool is "Machine Gun":
    4.             cancel event
    5.             loop 2 times:
    6.                 shoot an arrow at speed 0.9
    7.                 push the player backwards at velocity 0.03
    8.                 wait a tick
    9.                 shoot an arrow at speed 0.9
    10.                 wait a tick
    11.                 shoot an arrow at speed 0.9
     
  3. SquidR

    SquidR New Member

    Joined:
    Jan 28, 2021
    Messages:
    5
    Likes Received:
    0
    thank you!
     
  4. FireRoz

    FireRoz Active Member

    Joined:
    May 28, 2020
    Messages:
    134
    Likes Received:
    5
    mark issue as solved

    also i made a GUN script so here u go
    Code (Text):
    1. command /weapon [<text>] [<player>]:
    2.   permission: manager
    3.   trigger:
    4.     if arg-2 is not set:
    5.       send "/weapon <weapon type or list> <player>"
    6.      
    7.     if arg-2 is set:
    8.       if arg-1 is "list":
    9.         send "1) AK-47"
    10.         SEND "2) Bazooka"
    11.       if arg-1 is "ak47":
    12.         give arg-2 stick named "&cAK-47" with lore "&7Right click from a distance at a player.%newline%&7you're gonna be there soon :]"
    13.         send "&aGave &f%arg-2% &aan AK-47." to player
    14.       if arg-1 is "bazooka":
    15.         give arg-2 diamond shovel named "&2&lBAZOOKA" with lore "&7Right click from a distance at a player.%newline%&7but it's &2&lBOOM BOOM&7..."
    16.         send "&aGave &f%arg-2% &aa Bazooka." to player
    17.      
    18. on damage:
    19.   projectile is a snowball
    20.   attacker is holding a stick named "&cAK-47" with lore "&7Right click from a distance at a player.%newline%&7you're gonna be there soon :]":
    21.     damage victim by 2 hearts
    22.    
    23. on projectile hit:
    24.   projectile is an egg
    25.   shooter is holding a diamond shovel named "&2&lBAZOOKA" with lore "&7Right click from a distance at a player.%newline%&7but it's &2&lBOOM BOOM&7...":
    26.     shooter is in world "eventshub" or "allevents" or "build" or "parkours":
    27.       send "&cBuddy not today. Be in another world not the %shooter's world% &cworld..." to shooter
    28.     else:
    29.       loop all living entities in radius 10 around projectile:
    30.         damage loop-entity by 9 hearts
    31.       create an explosion of force 10 at projectile
    32.       set {air} to air
    33.       loop all blocks in radius 5 around projectile:
    34.         loop-block is not bedrock:
    35.           set loop-block to {air}
    36.  
    37.    
    38. on right click:
    39.   player is holding a stick named "&cAK-47" with lore "&7Right click from a distance at a player.%newline%&7you're gonna be there soon :]":
    40.     if {ammoak47.%player%} is greater or equal to 20:
    41.       send "&aWeapon needs a reload! Left click to reload!"
    42.     else:
    43.       shoot a snowball from player at speed 5
    44.       add 1 to {ammoak47.%player%}
    45.      
    46. on left click:
    47.   player is holding a stick named "&cAK-47" with lore "&7Right click from a distance at a player.%newline%&7you're gonna be there soon :]":
    48.     if {reloading.%player%} is true:
    49.       send "&cYou're already reloading muffin head...."
    50.     else:
    51.       set {reloading.%player%} to true
    52.       send "&aReloading."
    53.       wait 15 ticks
    54.       send "&aReloading.."
    55.       wait 15 ticks
    56.       send "&aReloading..."
    57.       wait 15 ticks
    58.       clear {ammoak47.%player%}
    59.       send "&aReload succeeded! You may now shoot."
    60.       set {reloading.%player%} to false
    61.  
    62.    
    63. on rightclick:
    64.   player is holding a diamond shovel named "&2&lBAZOOKA" with lore "&7Right click from a distance at a player.%newline%&7but it's &2&lBOOM BOOM&7...":
    65.     set {baz} to difference between {baz.%player%} and now
    66.     if {baz} is less than 5 seconds:
    67.       send "&aReloading..."
    68.       stop
    69.     set {baz.%player%} to now
    70.     shoot an egg from player at speed 0.9
    it has bazooka and ak47 and it can reload. every 20 bullets ak will reload and every 1 bullet bazooka will reload.
    left click to reload. bazooka automatically reloads
     
Thread Status:
Not open for further replies.

Share This Page

Loading...