local g=.22 function assignActivateGamepad()local g=UserInputService:GetConnectedGamepads()if#g>0 then for N=1,#g,1 do if activateGamepad==nil then activateGamepad=g[N]elseif g[N].Value<activateGamepad.Value then activateGamepad=g[N]end end end if activateGamepad==nil then activateGamepad=Enum.UserInputType.Gamepad1 end end
--
local thumbstickDeadzone = 0.22 --raised from 14% on 3/1/16 to accommodate looser XB360 controllers

function assignActivateGamepad()
	local connectedGamepads = UserInputService:GetConnectedGamepads()
	if #connectedGamepads > 0 then
		for i = 1, #connectedGamepads do
			if activateGamepad == nil then
				activateGamepad = connectedGamepads[i]
			elseif connectedGamepads[i].Value < activateGamepad.Value then
				activateGamepad = connectedGamepads[i]
			end
		end
	end
	
	if activateGamepad == nil then -- nothing is connected, at least set up for gamepad1
		activateGamepad = Enum.UserInputType.Gamepad1
	end
end
