# 11 Lua Scripts for OpenFunscripter

**URL:** <https://discuss.eroscripts.com/t/11-lua-scripts-for-openfunscripter/23602>\
**Category:** Software\
**Created:** [May 1, 2021, 10:54am UTC](https://discuss.eroscripts.com/t/11-lua-scripts-for-openfunscripter/23602 "2021-05-01T10:54:07Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lucifie](https://discuss.eroscripts.com/user_avatar/discuss.eroscripts.com/lucifie/32/4944_2.png) [@Lucifie](https://discuss.eroscripts.com/u/Lucifie)\
**Post date:** [May 1, 2021, 10:54am UTC](https://discuss.eroscripts.com/t/11-lua-scripts-for-openfunscripter/23602/1 "2021-05-01T10:54:08Z")

</div>

**These Lua scripts are no longer supported in Openfunscripter 2.0 and beyond. For similar tools that work with the newest version of OFS look here:**  
[https://discuss.eroscripts.com/t/my-tools-extension-for-openfunscripter/61434](https://discuss.eroscripts.com/t/my-tools-extension-for-openfunscripter/61434)  
  
  
**OpenFunscripter** is a mighty tool to create scripts but if you are creating patters you will notice that it can be hard to get something done without moving every single points by yourself. Luckily OFS supports Lua which gives you the possibility to create some little scripts that can help you to make scripting easier.

 ![Lua](https://eroscripts-discourse.eroscripts.com/original/2X/f/f18c0bb2b5eb20ea55bc2c0b83daeae2e1b2f3b4.png)

This topic is meant as a **Lua Script Collection** so it would be nice if you could also share your scripts if you have done any. This might help other people to start scripting or improve their scripts.

* * *

To use the scripts you just have to copy them to the script directory which can be found under:  
_Special Functions / Custom Functions / Script Directory_

 ![grafik](https://eroscripts-discourse.eroscripts.com/original/2X/a/a770e21f3a1327e57f5ef6491fb123dd58568fed.png)

* * *

> **Lua Scripts by Lucifie (9)**
>
> [Download from Mega](https://mega.nz/folder/N64XjIZJ#JzGwTaX_leeeQec30iLWzA)
> 
> ### AddPoints
> 
> Adds new evenly distributed points between all selected points.
> 
> ![grafik](https://eroscripts-discourse.eroscripts.com/original/2X/f/f9bf08b458fb0c163e2b0d542d264ff083077cca.png)  
> ![grafik](https://eroscripts-discourse.eroscripts.com/original/2X/a/a7fa671a5c4498cbc7a7e29230346e5c1eb653a3.png)  
> ![grafik](https://eroscripts-discourse.eroscripts.com/original/2X/9/9410f35a970a0a24b4fd6fbdaa0c500d31b2525d.png)
> 
> * * *
> 
> ### EqualPositions
> 
> Lets you define the upper and lower positions.
> 
> ![grafik](https://eroscripts-discourse.eroscripts.com/original/2X/c/c759a38c9d1ae1f4c60738f1b24e55853c62d27e.png)
> 
> * * *
> 
> ### InvertPositions
> 
> Inverts the selection in Y direction
> 
> ![grafik](https://eroscripts-discourse.eroscripts.com/original/2X/f/f167b7b7610bf35375cf6debeb857761ca7d79f2.png)  
> ![grafik](https://eroscripts-discourse.eroscripts.com/original/2X/a/a968b3902729230d0fea295978f0b523a3d0b8fc.png)
> 
> * * *
> 
> ### InvertTimestamps
> 
> Inverts the selection in X direction.
> 
> ![grafik](https://eroscripts-discourse.eroscripts.com/original/2X/a/a968b3902729230d0fea295978f0b523a3d0b8fc.png)  
> ![grafik](https://eroscripts-discourse.eroscripts.com/original/2X/9/93ab3d7818a3761d19be82cf7e37c339fb113b3a.png)
> 
> * * *
> 
> ### ScaleTimestamps
> 
> Scales the selected timestamps to increase or decrease the speed by 0.5x - 10x.
> 
> ![grafik](https://eroscripts-discourse.eroscripts.com/original/2X/f/f3ce43648d0092b1689e465efbae2b62252d0b67.png)
> 
> * * *
> 
> ### Wave
> 
> Adds a wave to the selection. This script is very versatile if you overlay them.  
> Needs a little bit of trial and error to get what you want.
> 
> ![grafik](https://eroscripts-discourse.eroscripts.com/original/2X/6/69a96f01bcd16f7fc21c0e2d4d664d8f34a0b027.png)  
> ![grafik](https://eroscripts-discourse.eroscripts.com/original/2X/6/6cab60c4f25827949287c1b071be3b3d9f85d546.png)  
> ![grafik](https://eroscripts-discourse.eroscripts.com/original/2X/d/db9bdef1467a76aebd864b93f89cbb2383062e4f.png)
> 
> * * *
> 
> ### WaveEnd
> 
> This is an extension to the Wave script which lets you also set the end values. I have made it as a separate script so you don’t have to edit both points for normal waves.
> 
> Starting values and end values are different.
> 
> ![grafik](https://eroscripts-discourse.eroscripts.com/original/3X/e/f/efb5a0c3a26fe5d9404872d20c9c2212ba89442d.jpeg)
> 
> * * *
> 
> ### Sawtooth
> 
> If only the upper or lower points are selected then it will shift the timestamps forth and back a little to create the sawtooth effect.
> 
> ![grafik](https://eroscripts-discourse.eroscripts.com/original/2X/4/4899ef3a2efa16949710c3122f7efd53317ed9c3.png)
> 
> If you select all points then it will compress and decrompress the selected area in waves. Works best if executed multiple times with small values.
> 
> ![grafik](https://eroscripts-discourse.eroscripts.com/original/2X/c/ca6ebdb8c140a3894669a312ed61eee40c0faef3.png)
> 
> * * *
> 
> ### Select-PointsToSkip
> 
> This script will deselect a number of points in a selection giving you more control.
> 
> ![grafik](https://eroscripts-discourse.eroscripts.com/original/2X/7/72c39fa05e86d025846a08d2359b7f5db4b94792.png)
> 
> ![grafik](https://eroscripts-discourse.eroscripts.com/original/2X/7/713af34e9fc28fbea158dc806dd092e0afb3dc25.png)
> 
> Select the first curve by starting the selection at the first point and skip 1.
> 
> ![grafik](https://eroscripts-discourse.eroscripts.com/original/2X/f/f87f0e190a9bae91a4fc50a2966fbd72f94410a2.png)
> 
> Select the second curve by starting the selection at the second point and skip 1.
> 
> ![grafik](https://eroscripts-discourse.eroscripts.com/original/2X/f/f3c81a7133db40740009de0f55c400ae28d3ee89.png)
> 
> Select the middle points by starting the selection at the second point and skip 2.
> 
> ![grafik](https://eroscripts-discourse.eroscripts.com/original/2X/e/e5230c7e68ba04daab25304b28e976f9bb3cbb5c.png)
> 
> Adding and removing points this way can help to create some unique patterns.
> 
> ![grafik](https://eroscripts-discourse.eroscripts.com/original/2X/4/47e0870f0d4f10126ec2256389609a7f41041375.png)

> **Lua Scripts by Husky (2)**
>
> [11 Lua Scripts for OpenFunscripter - #11 by Husky](https://discuss.eroscripts.com/t/9-lua-scripts-for-openfunscripter/23602/11)

---

<div class="post-metadata">

**Author:** ![hosenguy](https://discuss.eroscripts.com/user_avatar/discuss.eroscripts.com/hosenguy/32/12030_2.png) [@hosenguy](https://discuss.eroscripts.com/u/hosenguy)\
**Post date:** [May 1, 2021, 9:57pm UTC](https://discuss.eroscripts.com/t/11-lua-scripts-for-openfunscripter/23602/2 "2021-05-01T21:57:22Z")

</div>

Thank you very much for sharing.

I use these type of wave patterns with hypno, binaural beats, and gooning videos.

Thanks again!

---

<div class="post-metadata">

**Author:** ![hosenguy](https://discuss.eroscripts.com/user_avatar/discuss.eroscripts.com/hosenguy/32/12030_2.png) [@hosenguy](https://discuss.eroscripts.com/u/hosenguy)\
**Post date:** [May 1, 2021, 11:55pm UTC](https://discuss.eroscripts.com/t/11-lua-scripts-for-openfunscripter/23602/3 "2021-05-01T23:55:11Z")

</div>

I have wondered if you could make a lua that makes a fade in of the stroke length? I don’t know much about how these lua work so I don’t feel I can write them.  
Specifically the function would allow a level to start and a level to end. This would save me a lot of moving points!  
Anyway I love that you are sharing these!

---

<div class="post-metadata">

**Author:** ![Lucifie](https://discuss.eroscripts.com/user_avatar/discuss.eroscripts.com/lucifie/32/4944_2.png) [@Lucifie](https://discuss.eroscripts.com/u/Lucifie)\
**Post date:** [May 2, 2021, 1:00am UTC](https://discuss.eroscripts.com/t/11-lua-scripts-for-openfunscripter/23602/4 "2021-05-02T01:00:46Z")

</div>

Just added **AddPoints** to the collection to get used to the language and to waste some time 😉

* * *

> [@hosenguy](#):
>
> I have wondered if you could make a lua that makes a fade in of the stroke length?

Dunno what you mean. Can you draw a picture to explain your request? 🙃

Fading like in the StrokeGenerator of HandyControl? If yes, then this is a different approach and if you want to apply it on an existing script then you need to analyse the script and shift positions and timestamps which is way more complicated than just to create this on the fly.  
 ![Stroke Generator - 312795](https://eroscripts-discourse.eroscripts.com/original/2X/1/18546e076674a03ed741125d7ba6f22bef32867f.png)

---

<div class="post-metadata">

**Author:** ![Husky](https://discuss.eroscripts.com/user_avatar/discuss.eroscripts.com/husky/32/206145_2.png) [@Husky](https://discuss.eroscripts.com/u/Husky)\
**Post date:** [May 2, 2021, 7:47pm UTC](https://discuss.eroscripts.com/t/11-lua-scripts-for-openfunscripter/23602/5 "2021-05-02T19:47:55Z")

</div>

That’s really cool!

I was always thinking that lua scripts could be a really good approach for people who try to script multiple axes, something like this:

1. You create a copy of the script
2. You select the whole script and run a lua script that converts it into pitch, roll or other axis
3. You modify the script from there

Mostly because during handjobs or blowjobs the certain twisting movements are kinda repetitive, so something that could modify the up & down strokes for you to give you a starting point for other axes could be a good idea, then you just remove unnecessary parts and have something close to the actual action on screen.

It’s probably easier in my head, but I guess that someone talented can do some really cool stuff with lua scripts. Even some mathematical functions can be a fun way to modify existing scripts - gaussian distribution, trigonometric functions and all.

![image](https://eroscripts-discourse.eroscripts.com/original/2X/1/1638f5ce867ad26af967597c298ca7f0e38d4520.png)

---

<div class="post-metadata">

**Author:** ![Lucifie](https://discuss.eroscripts.com/user_avatar/discuss.eroscripts.com/lucifie/32/4944_2.png) [@Lucifie](https://discuss.eroscripts.com/u/Lucifie)\
**Post date:** [May 2, 2021, 9:27pm UTC](https://discuss.eroscripts.com/t/11-lua-scripts-for-openfunscripter/23602/6 "2021-05-02T21:27:49Z")

</div>

Dunno how the rotation axis works and if that even feels realistic but its probably possible to increase the point density with the spline smoothing function to have more points to calculate the slope of the blue stroke curve. This will result in the red line which then needs to be simplified.

The faster the movement, the faster the twist.

![grafik](https://eroscripts-discourse.eroscripts.com/original/2X/5/540907d208fd9cde1507f635791c64266513299f.png)  
_This was made with Excel_

---

<div class="post-metadata">

**Author:** ![Wavelength](https://discuss.eroscripts.com/user_avatar/discuss.eroscripts.com/wavelength/32/14316_2.png) [@Wavelength](https://discuss.eroscripts.com/u/Wavelength)\
**Post date:** [May 3, 2021, 1:49am UTC](https://discuss.eroscripts.com/t/11-lua-scripts-for-openfunscripter/23602/7 "2021-05-03T01:49:57Z")

</div>

Oh

My

GOD…

I’m gonna waste, errr i mean, i’m gonna spend so much time messing with this.

This is exactly what i was hoping was somehow possible. Trying to do this manually would be a nightmare, So thanks so much for posting this, otherwise i’d probably never have known it was possible.

---

<div class="post-metadata">

**Author:** ![Lucifie](https://discuss.eroscripts.com/user_avatar/discuss.eroscripts.com/lucifie/32/4944_2.png) [@Lucifie](https://discuss.eroscripts.com/u/Lucifie)\
**Post date:** [May 8, 2021, 6:57pm UTC](https://discuss.eroscripts.com/t/11-lua-scripts-for-openfunscripter/23602/8 "2021-05-08T18:57:24Z")

</div>

Added a new script to the collection.

* * *

### Select-PointsToSkip

This script will deselect a number of points in a selection giving you more control.

 ![grafik](https://eroscripts-discourse.eroscripts.com/original/2X/f/f3c81a7133db40740009de0f55c400ae28d3ee89.png)

---

<div class="post-metadata">

**Author:** ![Lucifie](https://discuss.eroscripts.com/user_avatar/discuss.eroscripts.com/lucifie/32/4944_2.png) [@Lucifie](https://discuss.eroscripts.com/u/Lucifie)\
**Post date:** [May 8, 2021, 11:07pm UTC](https://discuss.eroscripts.com/t/11-lua-scripts-for-openfunscripter/23602/9 "2021-05-08T23:07:39Z")

</div>

Added another script to the collection and renamed **Invert** to **InvertPositions**

* * *

### InvertTimestamps

Inverts the selection in X direction.

 ![grafik](https://eroscripts-discourse.eroscripts.com/original/2X/a/a968b3902729230d0fea295978f0b523a3d0b8fc.png)  
 ![grafik](https://eroscripts-discourse.eroscripts.com/original/2X/9/93ab3d7818a3761d19be82cf7e37c339fb113b3a.png)

---

<div class="post-metadata">

**Author:** ![Lucifie](https://discuss.eroscripts.com/user_avatar/discuss.eroscripts.com/lucifie/32/4944_2.png) [@Lucifie](https://discuss.eroscripts.com/u/Lucifie)\
**Post date:** [May 19, 2021, 8:57pm UTC](https://discuss.eroscripts.com/t/11-lua-scripts-for-openfunscripter/23602/10 "2021-05-19T20:57:11Z")

</div>

### WaveEnd

This is an extension to the Wave script which lets you also set the end values. I have made it as a separate script so you don’t have to edit both points for normal waves.

Starting values and end values are different.

 ![grafik](https://eroscripts-discourse.eroscripts.com/original/3X/e/f/efb5a0c3a26fe5d9404872d20c9c2212ba89442d.jpeg)

I have used it to increase the amplitude over time in my newest script.  
[Kiittenymph - Anal Sex Machine](https://discuss.eroscripts.com/t/kiittenymph-anal-sex-machine/25548)

---

<div class="post-metadata">

**Author:** ![Husky](https://discuss.eroscripts.com/user_avatar/discuss.eroscripts.com/husky/32/206145_2.png) [@Husky](https://discuss.eroscripts.com/u/Husky)\
**Post date:** [July 5, 2021, 5:01pm UTC](https://discuss.eroscripts.com/t/11-lua-scripts-for-openfunscripter/23602/11 "2021-07-05T17:01:15Z")

</div>

### MovePointsToTop

This lua script is based on EqualPositions script by @Lucifie. The script moves all top points to the defined position while maintaining the stroke lenghts. Best used with high values (50-100), using too low values might shorten strokes.

Before:

 ![MovePoints_00](https://eroscripts-discourse.eroscripts.com/original/3X/f/2/f2dcf4b37bf46ae41f82302a630bbc7cf36ff0fe.png)

After:

 ![MovePointsToTop](https://eroscripts-discourse.eroscripts.com/original/3X/e/8/e8da279fa74733a2bf9fbcca7cdbca8d29849bb9.png)

### MovePointsToBottom

This lua script is based on EqualPositions script by @Lucifie. The script moves all bottom points to the defined position while maintaining the stroke lenghts. Best used with low values (0-50), using too high values might shorten strokes.

Before:

 ![MovePoints_00](https://eroscripts-discourse.eroscripts.com/original/3X/f/2/f2dcf4b37bf46ae41f82302a630bbc7cf36ff0fe.png)

After:

 ![MovePointsToBottom](https://eroscripts-discourse.eroscripts.com/original/3X/b/1/b17021b25253c325bfe6fc63bc11819020920b87.png)

> **[File folder on MEGA](https://mega.nz/folder/BNUliKRA#EG52JRCZkxgJeOw72ZqP3g)**

---

<div class="post-metadata">

**Author:** ![Ior1yagami](https://discuss.eroscripts.com/letter_avatar_proxy/v4/letter/i/a6a055/32.png) [@Ior1yagami](https://discuss.eroscripts.com/u/Ior1yagami)\
**Post date:** [August 12, 2021, 8:58pm UTC](https://discuss.eroscripts.com/t/11-lua-scripts-for-openfunscripter/23602/12 "2021-08-12T20:58:33Z")

</div>

Thanks for the move to top/bottom scripts. They’re really useful!

I would like to humbly make a reques for all the LUA experts out there.

It would be really great to be able to highlight a set of points and have an LUA script change the height of all the top points so that all strokes match as closely to a user defined speed as possible. So we could easily set sections to 150 units/s, 300 units/s etc without changing the timing of points.

Is such a thing possible via LUA?

---

<div class="post-metadata">

**Author:** ![xAliasGo](https://discuss.eroscripts.com/letter_avatar_proxy/v4/letter/x/858c86/32.png) [@xAliasGo](https://discuss.eroscripts.com/u/xAliasGo)\
**Post date:** [August 14, 2021, 2:44am UTC](https://discuss.eroscripts.com/t/11-lua-scripts-for-openfunscripter/23602/13 "2021-08-14T02:44:12Z")

</div>

Another LUA that I believe would be very useful when doing Multi-Axis would be something that added a pre determined number of points between the top and bottom position (ideally 2) that would allow for easy adjustment of Pitch motions during blowjobs and girl on top scenes. For example, when a neck is bending back and forward during BJ’s or when hips are twerkin or grinding in cowgirl position. At the moment I currently use the Add Points LUA from a copied version of the Y-Axis then select middle positions only and then adjust accordingly. There’s a pretty standard shape that usually takes form during two staple moves during BJ/cowgirl scenes. The neck/hip ‘flick’. This isn’t replicated well with the standard stroke shape of a top and bottom point and usually requires an additional point next to both the top and bottom that delays the Pitch change in either direction.

---

<div class="post-metadata">

**Author:** ![Hazman501](https://discuss.eroscripts.com/user_avatar/discuss.eroscripts.com/hazman501/32/31168_2.png) [@Hazman501](https://discuss.eroscripts.com/u/Hazman501)\
**Post date:** [October 12, 2021, 11:33am UTC](https://discuss.eroscripts.com/t/11-lua-scripts-for-openfunscripter/23602/14 "2021-10-12T11:33:16Z")

</div>

These look really cool but I cant seem to get them to work?

If I select two points and use lets say , sawtooth or wave should it add this inbetween those points? Or do I have to add all these points first?

I tried using add point which generates a long line of points, selecting them and then tried to apply wave but it only seemed to move those points along without adding a wave.

I hope that makes sense lol

---

<div class="post-metadata">

**Author:** ![Husky](https://discuss.eroscripts.com/user_avatar/discuss.eroscripts.com/husky/32/206145_2.png) [@Husky](https://discuss.eroscripts.com/u/Husky)\
**Post date:** [October 12, 2021, 3:29pm UTC](https://discuss.eroscripts.com/t/11-lua-scripts-for-openfunscripter/23602/15 "2021-10-12T15:29:34Z")

</div>

You need to add all the points first. Just add dozen or two strokes and then use the scripts.

---

<div class="post-metadata">

**Author:** ![poet145x](https://discuss.eroscripts.com/user_avatar/discuss.eroscripts.com/poet145x/32/11371_2.png) [@poet145x](https://discuss.eroscripts.com/u/poet145x)\
**Post date:** [October 19, 2021, 8:08am UTC](https://discuss.eroscripts.com/t/11-lua-scripts-for-openfunscripter/23602/16 "2021-10-19T08:08:24Z")

</div>

@Husky

Hey I noticed there were new Lua scripts your mega folder, “move proportionally to …” I was curious how that was different that what was there before?

---

<div class="post-metadata">

**Author:** ![Husky](https://discuss.eroscripts.com/user_avatar/discuss.eroscripts.com/husky/32/206145_2.png) [@Husky](https://discuss.eroscripts.com/u/Husky)\
**Post date:** [October 19, 2021, 3:28pm UTC](https://discuss.eroscripts.com/t/11-lua-scripts-for-openfunscripter/23602/17 "2021-10-19T15:28:14Z")

</div>

I made them in response for this comment under my tutorial: [https://discuss.eroscripts.com/t/how-to-script-in-openfunscripter-video-tutorial/16637/24?u=husky](https://discuss.eroscripts.com/t/how-to-script-in-openfunscripter-video-tutorial/16637/24?u=husky)

The scripts basically let you move top/bottom points by percentage amount rather then the value.

---

<div class="post-metadata">

**Author:** ![poet145x](https://discuss.eroscripts.com/user_avatar/discuss.eroscripts.com/poet145x/32/11371_2.png) [@poet145x](https://discuss.eroscripts.com/u/poet145x)\
**Post date:** [October 19, 2021, 5:47pm UTC](https://discuss.eroscripts.com/t/11-lua-scripts-for-openfunscripter/23602/18 "2021-10-19T17:47:41Z")

</div>

> [@Husky](#):
>
> he scripts basically let you move top/bottom points by percentage amount rather then the value.

Oh cool. I can see that being useful.

Thanks for the explanation!!

---

<div class="post-metadata">

**Author:** ![internetpornwho](https://discuss.eroscripts.com/letter_avatar_proxy/v4/letter/i/a183cd/32.png) [@internetpornwho](https://discuss.eroscripts.com/u/internetpornwho)\
**Post date:** [November 3, 2021, 11:41pm UTC](https://discuss.eroscripts.com/t/11-lua-scripts-for-openfunscripter/23602/19 "2021-11-03T23:41:55Z")

</div>

This is super useful - is there any way to increase the amplitude? Basically like your MovePointsToTop/MovePointsToBottom but the opposite. Modify the stroke point by changing both. Take the center of the stroke, and increase the amplitude by a magnitude?

Oh, it looks like the move proportionally does this? I’ll give that a shot.

---

<div class="post-metadata">

**Author:** ![Limitlessman](https://discuss.eroscripts.com/letter_avatar_proxy/v4/letter/l/3da27b/32.png) [@Limitlessman](https://discuss.eroscripts.com/u/Limitlessman)\
**Post date:** [February 26, 2022, 8:56pm UTC](https://discuss.eroscripts.com/t/11-lua-scripts-for-openfunscripter/23602/20 "2022-02-26T20:56:36Z")

</div>

a lua Script to copy clipboard **before** the actual position

[https://discuss.eroscripts.com/t/copy-before-lua-scripts-for-openfunscripter/51862?u=limitlessman](https://discuss.eroscripts.com/t/copy-before-lua-scripts-for-openfunscripter/51862?u=limitlessman)

[Next page](https://discuss.eroscripts.com/t/11-lua-scripts-for-openfunscripter/23602.md?page=2)
