Solved Problem with Gun Skript

  • 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!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.
Jul 25, 2019
20
2
0
27
So I'm trying to make a gun skript but all the guns have the same fire rate and I want the gun to shoot slower

Here is my code:
Code:
# Sniper Rifle


on right click holding a blaze rod:
    if the name of event-item is "Remington 700":
        player has a iron nugget
        remove iron nugget from the player
        make the player shoot an arrow at speed 10
        set name of last shot projectile to "SniperShot"
        wait 2 seconds

on damage:
    projectile exists
    projectile is an arrow
    the projectile's name is "SniperShot"
    damage the victim by 24 hearts

Please help me if you can.
Thanks to everyone in advance
 
Try It:
Code:
shoot arrow from the player at speed 10

If you want delay between shots:


Code:
on rgihtclick holding a blaze rod:
    if the name of event-item is "Remington 700":
        if {delay.remington.%player%} is not set:
            player has a iron nugget
            remove iron nugget from the player
            make the player shoot an arrow at speed 10
            set name of last shot projectile to "SniperShot"
            set {delay.remington.%player%} to player
            wait 2 seconds
            clear {delay.remington.%player%}
        else:
            stop
 
Last edited:
Try It:
Code:
shoot arrow from the player at speed 10

If you want delay between shots:


Code:
on rgihtclick holding a blaze rod:
    if the name of event-item is "Remington 700":
        if {delay.remington.%player%} is not set:
            player has a iron nugget
            remove iron nugget from the player
            make the player shoot an arrow at speed 10
            set name of last shot projectile to "SniperShot"
            set {delay.remington.%player%} to player
            wait 2 seconds
            clear {delay.remington.%player%}
        else:
            stop

Thank you so much. This works very well thank you
 
  • Like
Reactions: Endissitin
Status
Not open for further replies.