From 8e2755d25d9371da5b2ea5219caf449e32d8be9f Mon Sep 17 00:00:00 2001 From: Regan Green Date: Sat, 8 Jul 2023 21:43:00 -0400 Subject: [PATCH] fix tas input --- client/init.server.lua | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/client/init.server.lua b/client/init.server.lua index 32904f7..a9af330 100644 --- a/client/init.server.lua +++ b/client/init.server.lua @@ -195,7 +195,6 @@ local function updateController(controller: Controller, humanoid: Humanoid?) BUTTON_FEED[Buttons.A_BUTTON] = Enum.UserInputState.End end - local character = humanoid.Parent local lastButtonValue = controller.ButtonDown() for button, state in pairs(BUTTON_FEED) do @@ -206,20 +205,18 @@ local function updateController(controller: Controller, humanoid: Humanoid?) end end - local buttonValue = controller.ButtonDown() - controller.ButtonPressed:Set(buttonValue) table.clear(BUTTON_FEED) - if character and character:GetAttribute("TAS") then - return - end + local buttonValue = controller.ButtonDown() + controller.ButtonPressed:Set(buttonValue) + controller.ButtonPressed:Band(bit32.bxor(buttonValue, lastButtonValue)) - if Core:GetAttribute("ToolAssistedInput") then - return + local character = humanoid.Parent + if (character and character:GetAttribute("TAS")) or Core:GetAttribute("ToolAssistedInput") then + if controller.ButtonDown:Has(Buttons.A_BUTTON) then + controller.ButtonPressed:Set(Buttons.A_BUTTON) + end end - - local diff = bit32.bxor(buttonValue, lastButtonValue) - controller.ButtonPressed:Band(diff) end ContextActionService:BindAction("MarioDebug", processAction, false, Enum.KeyCode.P)