do local g=false local function o()if g then StopFreecam()else StartFreecam()end g=not g end local function B(g)for o=1,#g-1,1 do if not UserInputService:IsKeyDown(g[o])then return end end o()end local function u(g,o,u)if o==Enum.UserInputState.Begin then if u.KeyCode==FREECAM_MACRO_KB[#FREECAM_MACRO_KB]then B(FREECAM_MACRO_KB)end end return Enum.ContextActionResult.Pass end ContextActionService:BindActionAtPriority("\070\114\101\101\099\097\109\084\111\103\103\108\101",u,false,TOGGLE_INPUT_PRIORITY,FREECAM_MACRO_KB[#FREECAM_MACRO_KB])end


do
	local enabled = false

	local function ToggleFreecam()
		if enabled then
			StopFreecam()
		else
			StartFreecam()
		end
		enabled = not enabled
	end

	local function CheckMacro(macro)
		for i = 1, #macro - 1 do
			if not UserInputService:IsKeyDown(macro[i]) then
				return
			end
		end
		ToggleFreecam()
	end

	local function HandleActivationInput(action, state, input)
		if state == Enum.UserInputState.Begin then
			if input.KeyCode == FREECAM_MACRO_KB[#FREECAM_MACRO_KB] then
				CheckMacro(FREECAM_MACRO_KB)
			end
		end
		return Enum.ContextActionResult.Pass
	end

	ContextActionService:BindActionAtPriority("FreecamToggle", HandleActivationInput, false, TOGGLE_INPUT_PRIORITY, FREECAM_MACRO_KB[#FREECAM_MACRO_KB])
end
