mirror of
https://github.com/niwla23/visible_sneak.git
synced 2025-01-13 16:37:30 +01:00
21 lines
558 B
Lua
21 lines
558 B
Lua
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) |