Actions[DefaultKeybinds.ThrottleUp]=HandleHoldDown(KnobModule.ThrottleUp)Actions[DefaultKeybinds.ThrottleDown]=HandleHoldDown(KnobModule.ThrottleDown)Actions[DefaultKeybinds.Mode]=KnobModule.ModePressed Actions[DefaultKeybinds.Forward]=ReverserModule.FWDPressed Actions[DefaultKeybinds.Reverse]=ReverserModule.REVPressed Actions[DefaultKeybinds.Stop]=ReverserModule.STOPPressed Actions[DefaultKeybinds.Find]=VisualizeModule.VisualizePressed Actions[DefaultKeybinds.Type]=AddressModule.ForceFocus Actions[DefaultKeybinds.Lights]=(FunctionsModule.GetButtons()).Lights.Activate Actions[DefaultKeybinds.Horn]=(FunctionsModule.GetButtons()).Horn.Activate local z={}function z.SetEnabled(z)Enabled=z if Enabled and not InputBeganConnection then InputBeganConnection=UIS.InputBegan:connect(HandleKeyDown)elseif not Enabled and InputBeganConnection then InputBeganConnection:Disconnect()InputBeganConnection=nil end end return z
-- set all the functions up with their keybinds
Actions[DefaultKeybinds.ThrottleUp] = HandleHoldDown(KnobModule.ThrottleUp)
Actions[DefaultKeybinds.ThrottleDown] = HandleHoldDown(KnobModule.ThrottleDown)
Actions[DefaultKeybinds.Mode] = KnobModule.ModePressed

Actions[DefaultKeybinds.Forward] = ReverserModule.FWDPressed
Actions[DefaultKeybinds.Reverse] = ReverserModule.REVPressed
Actions[DefaultKeybinds.Stop] = ReverserModule.STOPPressed

Actions[DefaultKeybinds.Find] = VisualizeModule.VisualizePressed
Actions[DefaultKeybinds.Type] = AddressModule.ForceFocus

Actions[DefaultKeybinds.Lights] = FunctionsModule.GetButtons().Lights.Activate
Actions[DefaultKeybinds.Horn] = FunctionsModule.GetButtons().Horn.Activate

local module = {}

function module.SetEnabled(enabled)
	Enabled = enabled
	if Enabled and not InputBeganConnection then
		InputBeganConnection = UIS.InputBegan:connect(HandleKeyDown)
	elseif not Enabled and InputBeganConnection then
		InputBeganConnection:Disconnect()
		InputBeganConnection = nil
	end
end

return module
