# Vehicle Morph

The **Vehicle Spawner Script** for FiveM is the one-stop solution for Vehicles Morphing In-Game!

***

<figure><img src="/files/7zh66Nef7GwSoeKKYldi" alt=""><figcaption></figcaption></figure>

1. [Ox\_lib](https://github.com/overextended/ox_lib)
2. Badger Discord API

***

<figure><img src="/files/SpMscVNMZqsjkgvXax7q" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/pHFEb0qckvynaArRZpyT" alt=""><figcaption><p>Command Preview</p></figcaption></figure>

{% embed url="<https://arcticdevlabs.com/assets/media/screenshots/mp4/vehicle-morph/AD-VehicleMorphPreview.mp4>" %}

***

{% hint style="info" %}
Want to add a new category?
{% endhint %}

```lua
VehicleGroups = {
    ["emergency"] = {
        "AD_19DOTGenericSierra", -- First vehicle in the list is the default spawn for the group
        "AD_20LEOGenericHellcatRB", -- Second vehicle in the list is the first morph
        "AD_22LEOGenericNavigatorRB", -- Third vehicle in the list is the second morph, 
        "AD_21LEOGenericTRXRB", -- Fourth vehicle in the list is the third morph
        "AD_23LEOGenericInvencibleRB", -- Fifth vehicle in the list is the fourth morph
        "AD_12LEOGeneric300RB", -- Sixth vehicle in the list is the fifth morph
        "AD_19LEOGenericYukonRB" -- Last vehicle in the list is the final morph
    },
    ["civilian"] = {
        "AD_19GenericAventador", -- First vehicle in the list is the default spawn for the group
        "AD_21GenericMustang", -- Second vehicle in the list is the first morph
        "AD_18GenericDemon", -- Third vehicle in the list is the second morph,
        "AD_20GenericHellcat", -- Fourth vehicle in the list is the third morph
        "AD_21GenericEscalade", -- Fifth vehicle in the list is the fourth morph
        "AD_23GenericCT4", -- Sixth vehicle in the list is the fifth morph
        "AD_22GenericNavigator" -- Last vehicle in the list is the final morph
    },
    ["new type"] = {
        "First Spawncode", -- First vehicle in the list is the default spawn for the group
        "Second Spawncode", -- Second vehicle in the list is the first morph
        "Third Spawncode", -- Third vehicle in the list is the second morph,
        "Fourth Spawncode", -- Fourth vehicle in the list is the third morph
        "FifthSpawncode", -- Fifth vehicle in the list is the fourth morph
        "Sixth Spawncode", -- Sixth vehicle in the list is the fifth morph
        "Last Spawncode" -- Last vehicle in the list is the final morph
    }
  }
}
```

***

```lua
Config = {
-----------------------------------------------------------------------------------------------------
-- Default Commands
-----------------------------------------------------------------------------------------------------
-- Default Command Set to: "vehmorph" - Sub-Commands: "start", "stop", "morph", "reset" all will require the user to input a group that is defined in the config below. Example: /vehmorph start emergency
-- Start Will ask for group then start the cycle causing it to morph to a new vehicle when you crash.
-- Stop Will ask for group then stop the cycle and prevent it from morphing to a new vehicle when you crash.
-- Morph Will will ask for group then force morph you to the next vehicle in the list
-- Reset Will will ask for group then reset the cycle back to the first vehicle in the list
-----------------------------------------------------------------------------------------------------
-- Notification Configurations
-----------------------------------------------------------------------------------------------------
UseNotification = false, -- Enable/Disable all notifications
NotifyType = 'Ox_lib', -- Options: VeniceNotify, OkOkNotify, ADNotify, Ox_lib, Chat, GTA
notifyTime = 10000, -- Default notification time in milliseconds
-----------------------------------------------------------------------------------------------------
-- Discord Role Locking Configurations
-----------------------------------------------------------------------------------------------------
UseDiscordRoleLocking = false, -- Enable/Disable Discord role-based permissions via Badger Perms API
DiscordRoleMorphPermission = "YOUR_DISCORD_ROLE_ID", -- Discord role ID for NPC menu access
-----------------------------------------------------------------------------------------------------
-- Vehicle Configurations
-----------------------------------------------------------------------------------------------------
VehicleHealthThreshold = 990, -- Vehicle Health is normally set to "1000" by GTA 5 decrease threshold to trigger morph.
DeleteVehicleAtEnd = true, -- Deletes the vehicle at the end of the cycle, if false the last vehicle will be kept
VehicleGroups = {
    ["emergency"] = {
        "AD_19DOTGenericSierra", -- First vehicle in the list is the default spawn for the group
        "AD_20LEOGenericHellcatRB", -- Second vehicle in the list is the first morph
        "AD_22LEOGenericNavigatorRB", -- Third vehicle in the list is the second morph, 
        "AD_21LEOGenericTRXRB", -- Fourth vehicle in the list is the third morph
        "AD_23LEOGenericInvencibleRB", -- Fifth vehicle in the list is the fourth morph
        "AD_12LEOGeneric300RB", -- Sixth vehicle in the list is the fifth morph
        "AD_19LEOGenericYukonRB" -- Last vehicle in the list is the final morph
    },
    ["civilian"] = {
        "AD_19GenericAventador", -- First vehicle in the list is the default spawn for the group
        "AD_21GenericMustang", -- Second vehicle in the list is the first morph
        "AD_18GenericDemon", -- Third vehicle in the list is the second morph,
        "AD_20GenericHellcat", -- Fourth vehicle in the list is the third morph
        "AD_21GenericEscalade", -- Fifth vehicle in the list is the fourth morph
        "AD_23GenericCT4", -- Sixth vehicle in the list is the fifth morph
        "AD_22GenericNavigator" -- Last vehicle in the list is the final morph
    }
  }
}
return Config
```

{% hint style="success" %}
Downloads

\[PAID | Open Source] [Official Store Link](https://arcticdevlabs.com/package/script?script=Vehicle-Morph)
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://arctic-development.gitbook.io/arctic-development/scripts/vehicle-morph.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
