Leaning/Prone/Crouch Script

Leaning/Prone/Crouch Script

In this script, you can crouch. You can lie down and even bend left and right while using a firearm. What’s more, the camera will follow your movements to make the game as comfortable as possible.

Features

  • Config file
  • Crouch and lie down button configuration
  • Choice of two modes for left and right leaning

ChangeLog

V1.0 - Realese

Preview

Code is accessible No
Subscription-based No
Lines (approximately) 200
Requirements N/A
Support Yes

Whats the resmon? Have you considered using oxlib for caching and listening to key input?

curious about the resmon as well… last prone script i had ran terribly.

Curious about the resmon as well and would like to see how synced the leaning is (what do other players see).
Can you shoot while in prone?

image || When not in use
image || When your aim is you bend over

For optimization, it’s not possible because I have to use the native ‘RenderScriptCams’ in a loop for the custom camera to work.

image

There are two modes

  • The first allows you to move around and have a more fluid camera, but the other players see each other tp because of the custom camera with the native one (CreateCam).

  • The other mode disables bending when the character is moving, to avoid TP.

Animations are nicely synchronized

You can’t shoot lying down

1 Like

Does this work in first person?

Yes, it works in first person

Can you share a video? Cool concept, just wish the resmon was lower but maybe a “sacrifice” worth making if it’s cool/useable even in first person.

Woah that is super high resmon :o. With about 150 scripts my server only runs at 1.3ms total peak. :o.

  • The first mode (bug : If players target each other, they see each other tp. So I created mode two to solve the problem.)

  • the second mode

1 Like

Small script update. I deactivated sniper and melee weapons to avoid bugs, then added the possibility of deactivating cursor/crossair.