From d7ae0c525c12fd5113da48fef5486683caeccf6d Mon Sep 17 00:00:00 2001 From: Niwla23 Date: Tue, 7 May 2019 21:58:51 +0200 Subject: [PATCH] initial commit --- init.lua | 21 +++++++++++++++++++++ mod.conf | 1 + 2 files changed, 22 insertions(+) create mode 100644 init.lua create mode 100644 mod.conf diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..69b79b5 --- /dev/null +++ b/init.lua @@ -0,0 +1,21 @@ +controls.register_on_press(function(player, key) + if key == "sneak" then + player:set_properties({ + visual_size = {x = 1, y = 0.9}, + collisionbox = {-0.3, 0.0, -0.3, 0.5, 1.7, 0.3}, + stepheight = 0.5, + eye_height = 1.3, + }) +end +end) + +controls.register_on_release(function(player, key) + if key == "sneak" then + player:set_properties({ + visual_size = {x = 1, y = 1}, + collisionbox = {-0.3, 0.0, -0.3, 0.5, 1.7, 0.3}, + stepheight = 0.6, + eye_height = 1.47, + }) + end +end) \ No newline at end of file diff --git a/mod.conf b/mod.conf new file mode 100644 index 0000000..d183a9e --- /dev/null +++ b/mod.conf @@ -0,0 +1 @@ +depends=controls \ No newline at end of file