# 🪓Sniper And Ballistics Integration

### Sniper And Ballistics System Integration

1. Of course, first import the "**Sniper And Ballistics System"** asset to your project (Also read [**this**](https://rsb.inanevin.com/)) if you didn't before.
2. There is no **Integration File** inside the asset because you will need to **Replace** a script for the integration.

{% tabs %}
{% tab title="OPTION #1" %}
{% hint style="info" %}
Go to the **OPTION #2** tab if you don't want to replace the whole script!
{% endhint %}

### Here, we will replace the needed script for the integration.

1. Find the "**SniperAndBallisticsSystem.cs"** in your project.
2. Replace that script with the one below:

{% embed url="<https://drive.google.com/file/d/1o-5JBtPQ4Yfnf_u67exNCY8a_bl5b1Cb/view?usp=sharing>" %}
Click the button at Top Right to download the script!
{% endembed %}

\
**And that's all, now you can just save and test it!**
{% endtab %}

{% tab title="OPTION #2" %}
{% hint style="info" %}
Go to the **OPTION #1** tab if you just want to replace the whole script. **(Easier)**
{% endhint %}

### Here, we will add a code to a script to make the integration work

1. Find the "**SniperAndBallisticsSystem.cs"** in your project.
2. Open the script and go to the **Line 817!**
3. Add these **Lines Of Code** to there.

```
if (hit.transform != null)
{
    if (hit.transform != null)
    {
        UniversalAI.UniversalDamageable damageable = hit.transform.GetComponent<UniversalAI.UniversalDamageable>();
        
        if(damageable != null)
        {
            damageable.TakeDamage(Random.Range(50,75));
        }
        return btp;
    }
}
```

![This is how it should look!](https://3198999246-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MejzI_j9LF2lim8AhR-%2F-MjA6OIwhgxvGGhywt8O%2F-MjA8aKgKKvjL60z3bjC%2Fimage.png?alt=media\&token=ec8e7761-2e81-4dd0-affc-6421d1d9f4eb)

**And that's all, now you can just save and test it!**
{% endtab %}
{% endtabs %}
