Keybinds when mode awakened

So I’m trying to make it when you click “U” it will awaken a mode that will allow other keybinds to do moves but nothing seems to be working if anyone could help me it would be much appreciated and have a good day! :D’

1 Like
-- Store awakened as a variable
local awakened = false

game:GetService('UserInputService').InputBegan:Connect(function(input, gpe)
  if (gpe) then return end -- Ignore game processed events

  -- Set awakened to true when U is pressed
  if (input.KeyCode == Enum.KeyCode.U) then
    awakened = true
  end
  
  if (not awakened) then return end -- Don't continue if awakened isn't true

  if (input.KeyCode == Enum.KeyCode.G) then
    -- do something else when G is pressed etc.
  end
end)
1 Like

Thanks it worked just like I wanted it to! ;D