do local p=false local function M()if p then StopFreecam()else StartFreecam()end p=not p end local function t(p)for M=1,#p-1,1 do if not UserInputService:IsKeyDown(p[M])then return false end end M()return true end local function D(p,M,D)if M==Enum.UserInputState.Begin then if D.KeyCode==FREECAM_MACRO_KB[#FREECAM_MACRO_KB]then t(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\050",D,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 false
			end
		end
		ToggleFreecam()
		return true
	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)
				--[[if CheckMacro(FREECAM_MACRO_KB) then
					return Enum.ContextActionResult.Sink
				end]]
			end
		end
		return Enum.ContextActionResult.Pass
	end

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