From 858c7d401b65e51bd47728a51047be6f1b35c608 Mon Sep 17 00:00:00 2001 From: NullBite Date: Thu, 24 Mar 2022 02:15:07 -0400 Subject: [PATCH] Add tpose emote --- script.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/script.lua b/script.lua index 967a820..6cb6f1f 100644 --- a/script.lua +++ b/script.lua @@ -478,6 +478,8 @@ action_wheel.SLOT_2.setTitle('log health') action_wheel.SLOT_2.setFunction(function() print(player.getHealth()) end) action_wheel.SLOT_3.setTitle('Toggle Armor') action_wheel.SLOT_3.setFunction(function() setArmor() end) +action_wheel.SLOT_4.setTitle('T-Pose') +action_wheel.SLOT_4.setFunction(function() ping.tPose() end) -- Pings -- --- Damage function -- @@ -537,6 +539,11 @@ function ping.syncState(tbl) end PartsManager.refreshAll() end + +function ping.tPose() + local_state.emote_vector=player.getPos() + animation.tpose.start() +end -- }}} -- Timer (not mine lol) -- {{{ @@ -644,6 +651,11 @@ function tick() ping.oof(player.getHealth()) end + if animation.tpose.isPlaying() and local_state.emote_vector.distanceTo(player.getPos()) >= 0.5 then + animation.tpose.stop() + end + + if old_state.isUnderwater ~= player.isUnderwater() then syncState() end old_state.isUnderwater=player.isUnderwater() -- End of tick --